nl
stringlengths
13
387
bash
stringlengths
1
532
change the permissions of all the regular files in the current folder
find . -type f -exec chmod 500 {} ';'
change the permissions of all the regular/normal files in the current folder
chmod 640 `find ./ -type f -print`
change the permissions of all the regular/normal files in the current folder
sudo find . -type f -exec chmod 644 {} +
change the permission of all the regular/normal files in the current folder from 777 to 755
find . -type f -perm 777 -exec chmod 755 {} \;
change the permissions of all the regular/normal files in the folder "/path/to/someDirectory" to 644
sudo find /path/to/someDirectory -type f -print0 | xargs -0 sudo chmod 644
change the permission of all the regular files in the folder /home to 700
find /home -type f -perm 0777 -print -exec chmod 700 {} \;
change the permissions of all the regular files in the folder root_dir to 444
find root_dir -type f -exec chmod 444 {} \;
Change permissions of all regular files in the ~/dir_data directory tree in accordance with mode `a-x,u+w'
find ~/dir_data -type f -exec chmod a-x,u+w {} \;
change the permission of all the normal/regular files to 644 in the current folder
find -type f -exec chmod 644 {} \;
change the permissions of all the regular/normal files to 644 in the folder /home/nobody/public_html
find /home/nobody/public_html -type f -exec chmod 644 {} \;
Change the permission of all regular files under current directory tree to 644
find . -type f -exec chmod 644 {} \;
Change the permissions of all regular files whose names end with .mp3 in the directory tree /var/ftp/mp3
find /var/ftp/mp3 -name '*.mp3' -type f -exec chmod 644 {} \;
change the permission of all the rpm files in the entire file system to 755
find / -name *.rpm -exec chmod 755 '{}' \;
change permissions of all the script files in a directory
find /home/john/script -name "*.sh" -type f -exec chmod 644 {} \;
Change permissions of directory "/home/sshtunnel/" to 555
chmod 555 /home/sshtunnel/
change the permissions of the directories from 777 to 755 in the folder "/var/www/html"
find /var/www/html -type d -perm 777 -print -exec chmod 755 {} \;
Change the permissions of every directory in the current directory and all files and directories within them to 700
find . -maxdepth 1 -type d -exec chmod -R 700 {} \;
change permissions of files older than 30 days
find /path/to/directory -type f -mtime +30 -exec chmod 644 {} +
change the permissions of mp3 files in the folder /var/ftp/mp3 to 644
find /var/ftp/mp3 -name '*.mp3' -type f -exec chmod 644 {} \;
Change permission to 000 of all directories named '.texturedata' under '/path/to/look/in/' directory tree
find /path/to/look/in/ -type d -name '.texturedata' -exec chmod 000 {} \; -prune
Change permission to 000 of all directories named '.texturedata' under '/path/to/look/in/' directory tree
find /path/to/look/in/ -type d -name '.texturedata' -prune -print0 | xargs -0 chmod 000
Change the permission to 0644 for all files under current directory
find . -type f -exec chmod 0644 {} +
Change the permission to 0644 for all files under current directory
find . -type f -exec chmod 0644 {} \;
Change permissions to 0755 for all directories in the /path directory tree
find /path -type d -exec chmod 0755 "{}" \;
Change permissions to 0755 for all directories in the /path directory tree
find /path -type d -exec chmod 0755 {} \;
Change permissions to 0755 for all directories in the /path directory tree
find /path -type d | xargs chmod 0755
Change permissions to 500 for all regular files under and below the current directory
find . -type f -exec chmod 500 {} ';'
Change permissions to 600 for all regular .rb files in the current directory tree
find . -name "*.rb" -type f -exec chmod 600 {} \;
Change permissions to 644 for *.html files under /usr/local
find /usr/local -name "*.html" -type f -exec chmod 644 {} \;
Change permissions to 644 for all files in the current directory tree
find . -type f | xargs -I{} chmod -v 644 {}
Change permissions to 644 for all files in the current directory tree
find . -type f | xargs chmod -v 644
Change permissions to 644 for all files showing the respective chmod command
find ./ -type f -print0 | xargs -t -0 chmod -v 644
Change the permission to 644 for all files under current directory
find . -type f | xargs -I{} chmod -v 644 {}
Change the permission to 644 for all files under current directory
find . -type f | xargs chmod -v 644
Change permissions to 644 for all regular files under the /path/to/dir/ tree
find /path/to/dir/ -type f -print0 | xargs -0 chmod 644
Change permissions to 644 for all regular files under the /path/to/dir/ tree unless these permissions are already set
find /path/to/dir ! -perm 0644 -exec chmod 0644 {} \;
Change permissions to 644 for all regular files under the /path/to/dir/ tree unless these permissions are already set
find /path/to/dir/ -type f ! -perm 0644 -print0 | xargs -0 chmod 644
Change permissions to 644 for all regular files under and below /path/to/someDirectory/
find /path/to/someDirectory -type f -print0 | xargs -0 sudo chmod 644
Change permissions to 644 for all subdirectories
find . -type d -print0|xargs -0 chmod 644
Change permissions to 644 of multiple files with permissions 755
find . -perm 755 -exec chmod 644 {} \;
Change permissions to 644 of multiple regular files with permissions 755
find . -type f -perm 755 -exec chmod 644 {} \;
Change permissions to 644 recursively only for files
find . -type f -exec chmod 644 {} \;
Change permissions to 700 for directories at the current level and deeper
find . -mindepth 1 -type d | xargs chmod 700
Change permissions to 700 for files and directories deeper than the current directory
find . -mindepth 2 | xargs chmod 700
Change permissions to 755 for all directories in the /path/to/dir directory tree
find /path/to/dir -type d -exec chmod 755 {} \;
Change permissions to 755 for all directories in the current directory tree
find . -type d | xargs chmod -v 755
Change permission to 755 for all directories under $d directory tree
find "$d/" -type d -print0 | xargs -0 chmod 755
Change the permission to 755 for all directories under current directory
find . -type d | xargs chmod -v 755
Change permissions to 755 recursively only for directories
find . -type d -exec chmod 755 {} \;
Change permissions to u=rw,g=r,o= for all files in the current directory tree
find . -type f -exec chmod u=rw,g=r,o= '{}' \;
Change permissions to u=rw,g=r,o= for all files inside the current directory tree
find . -type f -exec chmod u=rw,g=r,o= '{}' \;
Change permissions to u=rwx,g=rx,o= for all directories in the current directory tree
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
Change permissions to u=rwx,g=rx,o= for all directories inside the current directory tree
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
Change symbolic link "$f" into a file
cp --remove-destination $(readlink $f) $f
Change the timestamp of symbolic link "somesymlink" to current date/time
touch -h somesymlink
Change to directory 'foo' and print to terminal all received on standard input
cd foo | cat
Change to directory 'xyz' and resolve any symlinks in the resulting path, making the physical path the current one.
cd -P xyz
Change to the directory containing the "oracle" executable
cd "$(dirname "$(which oracle)")"
Change to directory listed in file '$HOME/.lastdir'
cd `cat $HOME/.lastdir`
Change to the directory of the executable "python"
cd `dirname $(which python)`
Change to the directory pointed by variable TAG
cd "$TAG"
Changes to the directory where 'ssh' executable is located.
cd $(dirname $(which ssh));
Change to folder where the oracle binary is.
cd "$(dirname "$(which oracle)")"
Change to folder where the oracle binary is.
cd "$(dirname $(which oracle))"
Change to folder where the oracle binary is.
cd $(dirname $(which oracle))
Change to folder where the oracle binary is.
cd $(dirname `which oracle`)
Change to folder where the oracle binary is.
cd $(which oracle | xargs dirname)
Change to location of '$TARGET_FILE' file.
cd `dirname $TARGET_FILE`
Change to parent directory and resolve any symlinks in the resulting path, making the physical path the current one.
cd -P ..
Change the user and group of all files and directories under /var/www to www-data:www-data
find /var/www -print0 | xargs -0 chown www-data:www-data
change user and group of the file "/var/run/docker.sock" to user root and group dockerroot
sudo chown root:dockerroot /var/run/docker.sock
change user and group of the file /usr/bin/aws to user amzadm and group root
chown amzadm.root /usr/bin/aws
change user and group of the file bin to user and group root:wheel
sudo chown root:wheel bin
change user of the direct public_html to user owner and group nobody
chown owner:nobody public_html
Change user ownership to `foo' for files with UID=1005
find / -user 1005 -exec chown -h foo {} \;
Change user to "amzadm" and group to "root" of "/usr/bin/aws"
chown amzadm.root /usr/bin/aws
Change the user to daisy for directories and subdirectories owned by harry
find . -type d -user harry -exec chown daisy {} \;
Check all .txt files whether they contain "needle"
find . -type f -iname "*.txt" -print | xargs grep "needle"
Check all .txt files whose names may contain spaces whether they contain "needle"
find . -type f -iname "*.txt" -print0 | xargs -0 grep "needle"
Checks compressed file integrity.
bzip2 -t file.bz2
Check the environment variables generated by switching to the root account.
sudo env
check find version
find --version
Check if "\[$VLABEL\]" is mounted and save the result in variable "AMV"
AMV=$(mount -l | grep "\[$VLABEL\]")
Check if "~/mnt/sdc1" is mounted
mount | grep -q ~/mnt/sdc1
Check if the $somedir directory is empty
find "$somedir" -maxdepth 0 -empty -exec echo {} is empty. \;
Check if 'nullglob' shell option is enabled, and if so, saves its status in 'is_nullglob' variable.
is_nullglob=$( shopt -s | egrep -i '*nullglob' )
Check if a drive is mounted to nfs
mount |grep nfs
Check if a drive with UUID "$UUID" is mounted
mount | grep $(readlink -f /dev/disk/by-uuid/$UUID )
check if there any files from the .git folder after excluding it using the prune command
find . -path ./.git -prune -o -print -a \( -type f -o -type l -o -type d \) | grep '.git'
Check if content of all top-level *.txt files in the current directory contain only unique lines
cat *.txt | sort | sort -u -c
Check if the contents of file "subset" is a subset of file "set"
comm -23 <(sort subset | uniq) <(sort set | uniq) | head -1
Check if directory $some_dir is empty
find "`echo "$some_dir"`" -maxdepth 0 -empty
Check if the directory tree whose name is given as variable $somedir contains no regular files
find "$somedir" -type f -exec echo Found unexpected file {} \;
Check if the file "somelink" links to exists
ls `readlink somelink`
check if myfile has 0644 permissions
find myfile -perm 0644 -print
Check if process ID 1 exists (init or systemd) and current user has permission to send it signals.
kill -0 1
Check md5sum of directory /path against the checksum saved in file 'file'
du -csxb /path | md5sum -c file
check readline bindings for "\x61"
bind -p | grep $'"\x61"'
Checks that 'monit' user is in 'www-data' group.
groups monit |grep www-data
Check that the master ssh connection "officefirewall" is running
ssh -O check officefirewall