nl
stringlengths
13
387
bash
stringlengths
1
532
change the group to "new_group" and permissions to 770 for all the files in the current folder
find . -name "*" \( -exec chgrp -v new_group {} \; -o -exec chmod -v 770 {} \; \)
Change the group to `temp' for all files in the current directory tree that belong to group `root'
find . -group root -print | xargs chgrp temp
change html files to mode 644
find /usr/local -name "*.html" -type f -exec chmod 644 {} \;
Change the owner and group of "it" to "root"
chown root:root it
Change owner and group of "script.sh" to "root"
chown root:root script.sh
Change the owner and group of "testfile.txt" to "root"
sudo chown root:root testfile.txt
Change the owner and group of "uid_demo" to "root"
sudo chown root:root uid_demo
change the owner and group of all the directories in the current folder and /home/admin/data/ to admin & admin
find . /home/admin/data/ -type d -exec chown admin.admin {} \;
change owner and group of all files and directory into current directory to user and group apache
find . -maxdepth 1 -not -name "." -print0 | xargs --null chown -R apache:apache
change the owner and group of all the files in the folder /usr/lpp/FINANCIALS
find /usr/lpp/FINANCIALS -print | xargs chown roger.staff
change owner and group of the all files with group owner vboxusers into home directory to user and group kent
find ~ -group vboxusers -exec chown kent:kent {} \;
change the owner and group of all the normal/regular files in the current folder and /home/admin/data/ to admin & admin
find . /home/admin/data/ -type f -exec chown admin.admin {} \;
change owner and group of the file "/path/to/yourapp" to root
chown -v root:root /path/to/yourapp
change owner and group of the file it to user and group root
chown root:root it
change owner and group of the file script.sh to user root
chown root:root script.sh
change owner and group of the file uid_demo to user and group root
sudo chown root:root uid_demo
Change the owner of "$JBOSS_CONSOLE_LOG" to "$JBOSS_USER"
chown $JBOSS_USER $JBOSS_CONSOLE_LOG
Change the owner of "/var/www/html/mysite/images/" to "nobody"
sudo chown nobody /var/www/html/mysite/images/
Change the owner of "/var/www/html/mysite/tmp_file_upload/" to "nobody"
sudo chown nobody /var/www/html/mysite/tmp_file_upload/
Change onwer of "file" to "user_name"
chown user_name file
Change owner of "folder" to "user_name"
chown user_name folder
Change owner of "my_test_expect.exp" to "el"
sudo chown el my_test_expect.exp
Change the owner of "process" to "root"
sudo chown root process
Change the owner of all ".txt" files in directory tree "/mydir" to "root"
find /mydir -type f -name "*.txt" -execdir chown root {} ';'
Change the owner of all files in "/empty_dir/" to "root" using at most 10 files at a time
ls /empty_dir/ | xargs -L10 chown root
Change the owner of all files in "/empty_dir/" to "root" using at most 10 files at a time
ls /empty_dir/ | xargs -n10 chown root
change the owner of all the files in the current directory
find . -exec chown myuser:a-common-group-name {} +
Change the owner of all files in the current directory tree excluding those who match "./var/foo*" to "www-data"
find . -not -iwholename './var/foo*' -exec chown www-data '{}' \;
Change the owner of all files in the directory tree "dir_to_start" excluding directory "dir_to_exclude" to "owner"
find dir_to_start -name dir_to_exclude -prune -o -print0 | xargs -0 chown owner
Change the owner of all files in the directory tree "dir_to_start" excluding file "file_to_exclude" to "owner"
find dir_to_start -not -name "file_to_exclude" -print0 | xargs -0 chown owner
change the owner of all the files in folder /u/netinst to netinst
find /u/netinst -print | xargs chown netinst
change owner of all files into current directory except files named as './var/foo*' to user www-data
find . -not -iwholename './var/foo*' -exec chown www-data '{}' \;
change the owner of all the regular/normal files which belong to the root user to "tom" in the current folder
find .-type f -user root -exec chown tom {} \;
change owner of the file "file" to user user_name
chown user_name file
change owner of the file /home/bob to user root
sudo chown root /home/bob
change owner of the file destination_dir to user "user:
chown user destination_dir
change owner of the file file.sh to user root
$sudo chown root file.sh
change owner of the files into directory "/mydir" with ".txt" extension to user root
find /mydir -type f -name "*.txt" -execdir chown root {} ';'
change owner of the files into directory "/mydir" with ".txt" extension to user root
find /mydir -type f -name "*.txt" -print0 | xargs -0 chown root $(mktemp)
change owner of the files into directory dir_to_start except directory dir_to_exclude to user owner
find dir_to_start -name dir_to_exclude -prune -o -print0 | xargs -0 chown owner
change owner of the file my_test_expect.exp to user el
sudo chown el my_test_expect.exp //make el the owner.
change owner of the file process to user root
sudo chown root process
Change owner to "$1" and group to "httpd" of ".htaccess"
chown $1:httpd .htaccess
Change owner to "$FUID" and group to "$FGID" of "$FILE2"
chown $FUID:$FGID "$FILE2"
Change the owner to "hduser" and group to "hadoop" of "{directory path}"
sudo chown hduser:hadoop {directory path}
Change the owner to "owner" and group to "nobody" of "public_html"
chown owner:nobody public_html
Change owner to "root" and group to "dockerroot" of "/var/run/docker.sock"
sudo chown root:dockerroot /var/run/docker.sock
Change the owner to "root" and group to "specialusers" of "dir1"
chown root:specialusers dir1
Change owner to "root" and group to "wheel" of "adbind.bash"
sudo chown root:wheel adbind.bash
Change owner to "root" and group to "wheel" of "bin"
sudo chown root:wheel bin
Change onwer to "root" and group to "wheel" of "com.xxxx.adbind.plist"
sudo chown root:wheel com.xxxx.adbind.plist
Change owner to "root" and group to "www-data" of "/foobar/test_file"
sudo chown root:www-data /foobar/test_file
Change the owner to "user" and group to "group" of files "file ..."
chown user:group file ...
Change ownership of "/data/db" to the current user
sudo chown `whoami` /data/db
Change the ownership of "/home/bob" to "root"
sudo chown root /home/bob
Change ownership of "/vol" to the current user
sudo chown `whoami` /vol
change the ownership of all directories in the current folder
find . -type d -exec chown username {} \;
Change the ownership of all files in the current directory tree to myuser:a-common-group-name
find . -exec chown myuser:a-common-group-name {} +
change the ownership of all the files in the file system from edwarda to earnestc
find / -user edwarda -exec chown earnestc "{}" \;
change the ownership of all the files in the file system from edwarda to earnestc
find / -user edwarda -print | xargs chown earnestc
change the ownership of all regular/normal files in the current directory
find . -type f -exec chown username {} \;
change the ownership of all regular/normal files in the current directory
find . -type f | xargs chown username
change the ownership of all regular/normal files in the current directory(print0 is used to handle all the files which have spaces or new lines in their names)
find . -type f -print0 | xargs -0 chown username
Change the ownership to eva for all files/directories that belong to the user 'george' in the entire file system without traversing to other devices/partitions
find -x / -user george -print0 | xargs -0 chown eva
Change the ownership to the user daisy for all directories under current directory that are owned by harry
find . -type d -user harry -exec chown daisy {} \;
Change permissions for all PHP files under the current directory tree to 755
find . -name "*.php" -exec chmod 755 {} \;
change permissions for directories in the entire file system
chmod 751 `find ./ -type d -print`
Change permissions of ".bash_logout", ".bashrc", and ".profile" to 444
chmod 444 .bash_logout .bashrc .profile
Change permissions of ".git/hooks/pre-commit" to 777
sudo chmod 755 .git/hooks/pre-commit
Change permissions of ".git/hooks/prepare-commit-msg" to 777
sudo chmod 777 .git/hooks/prepare-commit-msg
Change permissions of "/dvtcolorconvert.rb" to 755
sudo chmod 755 /dvtcolorconvert.rb
Change permissions of "/usr/bin/wget" to 777
chmod 777 /usr/bin/wget
Change permissions of "mksdcard" to 755
sudo chmod 755 mksdcard
Change permssions of *.cgi files under directories htdocs and cgi-bin to 755
find htdocs cgi-bin -name "*.cgi" -type f -exec chmod 755 {} \;
change the permissions of al the directories in the current folder
sudo find . -type d -exec chmod 755 {} +
Change permissions of all directories from the current directory tree to 644
find . -type d -exec chmod 755 {} +
change the permissions of all the directories in the current folder
chmod 751 `find ./ -type d -print`
change the permissions of all the directories in the current folder
find . -type d -exec chmod 2775 {} \;
change the permissions of all the directories in the current folder
find . -type d | xargs chmod 2775
change the permission of all directories in current folder to 755.
find . -type d -exec chmod 755 {} \;
change the permissions of all the directories in the folder root_dir to 555
find root_dir -type d -exec chmod 555 {} \;
Change permissions of all directories in the ~/dir_data directory tree in accordance with mode `a+xr,u+w'
find ~/dir_data -type d -exec chmod a+xr,u+w {} \;
Change permissions of all directories residing under and below ./debian to 755
find ./debian -type d | xargs chmod 755
change the permission of all the directories to 755 in the current folder
find -type d -exec chmod 755 {} \;
change the permissions of all the directories to 755 in the folder "/home/nobody/public_html"
find /home/nobody/public_html -type d -exec chmod 755 {} \;
change the permissions of all the directories to 775 in the current folder
find . -type d -exec chmod 775 {} \;
Change permissions of all files ending ".php" under the current directory to 755 and print a count of modified files
find . -name "*.php" -exec chmod 755 {} + -printf '.' | wc -c
Change permissions of all files ending in ".php" under the current directory to 755 and print a count of modified files
find . -name "*.php" -exec chmod 755 {} \; -exec /bin/echo {} \; | wc -l
change the permissions of all the files ending with "fits" in the folder "/store/01"
find /store/01 -name "*.fits" -exec chmod -x+r {} \; \
change the permissions of all the files ending with "fits" in the folder "/store/01" and save the output file names to a log file
find /store/01 -name "*.fits" -exec chmod -x+r {} \; -exec ls -l {} \; | tee ALL_FILES.LOG
change the permission of all the files in the current directory to 664 and change the permission of all the directories in the current folder to 775.
find . \( -type f -exec sudo chmod 664 "{}" \; \) , \( -type d -exec sudo chmod 775 "{}" \; \)
change permission of all the files in the entire file system which have permissions 777.
find / -type f -perm 0777 -print -exec chmod 644 {} \;
change permission of all the files in the entire file system which have the permissions 777.
find / -type f -perm 0777 -print -exec chmod 644 {} \;
change the permissions of all the normal files in a directory
find /path/to/dir/ -type f -print0 | xargs -0 chmod 644
change the permission of all php files in current folder
find . -name "*.php" -exec chmod 755 {} \;
change the permission of all php files in current folder. Plus symbol at the end is used to give multiple files as input to the chmod command
find . -name "*.php" -exec chmod 755 {} +
change the permission of all the normal/regular files from 777 to 755 in the folder "/home/user/demo"
find /home/user/demo -type f -perm 777 -print -exec chmod 755 {} \;
Change permissions of all regular files from the current directory tree to 644
find . -type f -exec chmod 644 {} +
change the permissions of all regular/normal files in the current directory
find . -type f -exec chmod 664 {} \;
change the permissions of all regular/normal files in the current directory
find . -type f | xargs chmod 664