nl stringlengths 13 387 | bash stringlengths 1 532 |
|---|---|
recursively change user of the direct /home/test/ and all files into it to user test | sudo chown -R test /home/test |
recursively change user of the direct public_html and all files into it to user owner | chown -R owner:owner public_html |
Recursively compresses all files within $2 folder. | find $2 -type f -exec bzip2 {} \; |
Recursively compress every file in the current directory tree and keep the original file | gzip -kr . |
Recursively copies "$1" to "$2". | cp -R "$1" "$2" |
Recursively copies "$appname.app", preserving symlinks as symlinks to the 'Payload' directory. | cp -Rp "$appname.app" Payload/ |
Recursively copy "/path/to/data/myappdata/*.txt" to "user@host:/remote/path/to/data/myappdata/" | rsync -rvv /path/to/data/myappdata/*.txt user@host:/remote/path/to/data/myappdata/ |
Recursively copy "dir_a" to "dir_b" and delete any new files in "dir_b" | rsync -u -r --delete dir_a dir_b |
Recursively copy "dir_b" to "dir_a" and delete any new files in "dir_a" | rsync -u -r --delete dir_b dir_a |
Recursively copy "old/" to "new/" as a dry run skipping files that have matching checksums and output the name only | rsync -rcn --out-format="%n" old/ new/ |
Recursively copy "original_dir" to "copy_dir" preserving file/dir timestamps, displaying progress, and skipping files which match in size, keeps partially transferred files. | rsync -Prt --size-only original_dir copy_dir |
Recursively copy "source", "dir", and "target" to "dir" as a dry run | rsync -rvc --delete --size-only --dry-run source dir target dir |
Recursively copies '../include/gtest' directory to '~/usr/gtest/include/'. | cp -r ../include/gtest ~/usr/gtest/include/ |
Recursively copies 'SRCFOLDER' to the 'DESTFOLDER/' | cp -R SRCFOLDER DESTFOLDER/ |
Recursively copies 'src' to 'dest' preserving overwriting the existing files. | cp -nr src_dir dest_dir |
Recursively copies /mnt/usr/lib to the '/usr/' directory, creating symbolic links on each file instead of real copying them. | cp -rs /mnt/usr/lib /usr/ |
Recursively copy /path/to/foo on host "your.server.example.com" to local directory "/home/user/Desktop", connecting as ssh username "user". | scp -r user@your.server.example.com:/path/to/foo /home/user/Desktop/ |
Recursively copy all ".txt" files to "user@remote.machine:/tmp/newdir/" | rsync -rvv *.txt user@remote.machine:/tmp/newdir/ |
Recursively copy all files and directories in "demo" excluding ".git" to "demo_bkp" | find demo -depth -name .git -prune -o -print0 | cpio -0pdv --quiet demo_bkp |
Recursively copy all (non-hidden) files and directories in current dir except "foo" to location specified by variable "other" | rsync --recursive --exclude 'foo' * "$other" |
Recursively copy all files and directories matching "*ela*L1*TE*" in localhost's directory /tdggendska10/vig-preview-dmz-prod/docs/sbo/pdf/ to /var/www/html/sbo/2010/teacher/ela/level1 on localhost connecting as ssh user "dalvarado", in batch mode (no prompt for passwords) preserving file permissions and timestamps, and without displaying progress information. | scp -Bpqr /tdggendska10/vig-preview-dmz-prod/docs/sbo/pdf/*ela*L1*TE* dalvarado@localhost:/var/www/html/sbo/2010/teacher/ela/level1 |
Recursively copy all files and folders in the current directory excluding "exclude_pattern" to "/to/where/" | rsync -r --verbose --exclude 'exclude_pattern' ./* /to/where/ |
Recursively copies all files in the current directory but ones that names match pattern "dirToExclude|targetDir" to the 'targetDir' directory, printing info message on each operation. | cp -rv `ls -A | grep -vE "dirToExclude|targetDir"` targetDir |
Recursively copies all files in the current directory but ones with 'c' in name to the home directory. | cp -r `ls -A | grep -v "c"` $HOME/ |
Recursively copy all files matching "*.sh" in "$from" to "root@$host:/home/tmp/" compressing data during transmission | rsync -zvr --exclude="*" --include="*.sh" --include="*/" "$from" root@$host:/home/tmp/ |
Recursively copy all regular files below current directory to directory /tmp on hostname, connecting as ssh user matching current username on local host. | find . -type f -exec scp {} hostname:/tmp/{} \; |
Recursively copy directory "/path/to/data/myappdata" to "user@host:/remote/path/to/data/myappdata" | rsync -rvv /path/to/data/myappdata user@host:/remote/path/to/data/myappdata |
Recursively copy directory "/path/to/data/myappdata" to "user@host:/remote/path/to/data/newdirname" | rsync -rvv --recursive /path/to/data/myappdata user@host:/remote/path/to/data/newdirname |
Recursively copy directories "A" and "D" to directory "/path/to/target/directory" on host "anotherhost", connecting as ssh user matching current user on local host, via default TCP port for ssh (22). | scp -r A D anotherhost:/path/to/target/directory |
Recursively copy directory or file /something on host "myServer" to current directory on local host, connecting as ssh user matching username on local host. | scp -r myServer:/something |
Recursively copies everything from '/source/path/*' to the '/destination/path/', preserving from overwriting existing files, and printing info message on each operation. | cp -Rvn /source/path/* /destination/path/ |
Recursively copies everything from '/zzz/zzz/' to the '/xxx/xxx' overwriting the existing files and answering 'yes' on each request for overwriting. | yes | cp -rf /zzz/zzz/* /xxx/xxx |
Recursively copy everything in /source/path whose name doesn't begin with a period, to /destination/path, without overwriting existing files, and outputting a line for each file copied or skipped. | cp -Rvn /source/path/* /destination/path/ |
Recursively copies everything under the 'current' folder to the '.hiddendir' folder. | cp * .hiddendir -R |
recursively delete, without prompting, directories under /data/bin/test, that are older than 10 days and where the name starts with a number | find /data/bin/test -type d -mtime +10 -name "[0-9]*" -exec rm -rf {} \; |
recursively delete, without prompting, directories under /data/bin/test, that are older than 10 days and where the name starts with a number | find /data/bin/test -type d -mtime +10 -name '[0-9]*' -print | xargs rm -rf ; |
Recursively finds 'pattern' in files from current folder, and prints matched string with number only if matching whole word. | grep -rnw "pattern" |
Recursively finds all "*.pas" and "*.dfm" files and prints strings with "searchtext" ignoring text distinctions, suppressing error messages, highlighting found patterns and preceding each found string with file name and string number. | find . -type f \( -name "*.pas" -o -name "*.dfm" \) -print0 | xargs --null grep --with-filename --line-number --no-messages --color --ignore-case "searchtext" |
Recursively finds all "file_pattern_name" files and folders and prints strings with "pattern", searching through found folders recursively. | find ./ -name "file_pattern_name" -exec grep -r "pattern" {} \; |
Recursively finds all '*.pdf' files in a current folder and removes them. | find . -name "*.pdf" -exec rm {} \; |
Recursively finds all '*.pdf' files in a current folder and removes them. | find . -name "*.pdf" -print0 | xargs -0 rm |
Recursively finds all '*.pdf' files in a current folder and removes them. | find . -name '*.pdf' -exec rm {} + |
Recursively finds all '*.png' files older than 50 days in a current folder and removes them. | find . -name "*.png" -mtime +50 -exec rm {} \; |
Recursively finds all 'STATUS.txt' files containing text 'OPEN' and prints containing folder of them. | fgrep --include='STATUS.txt' -rl 'OPEN' | xargs -L 1 dirname |
Recursively finds all 'STATUS.txt' files containing text 'OPEN' and prints containing folder of them. | find -type f -name "STATUS.txt" -exec grep -q "OPEN" {} \; -exec dirname {} \; |
Recursively finds all *.dbf files from the root folder and prints list of folders with such files. | find / -name \*.dbf -print0 | xargs -0 -n1 dirname | sort | uniq |
Recursively finds all *.txt files and prints strings with "text_pattern" ignoring text distincts. | find . -name "*.txt" | xargs grep -i "text_pattern" |
Recursively finds all bzip2 compressed files in a current folder and decompresses them. | find ./ -iname "*.bz2" -exec bzip2 -d {} \; |
Recursively finds all files and prints all strings with 'text-to-find-here' from that files. | find / -type f | xargs grep 'text-to-find-here' |
Recursively finds all files and prints all strings with 'text-to-find-here' from that files, preceding matched string with filename. | find ./ -type f -exec grep -H 'text-to-find-here' {} \; |
Recursively finds all files and prints only names of files that contain "word" and suppressing error messages . | find . | xargs grep 'word' -sl |
Recursively find all files ending with '*.txt' and print they names and content | find . -name \*.txt -print -exec cat {} \; |
Recursively find all files in the directory "posns" and split each one into files of at most 10000 lines each | find posns -type f -exec split -l 10000 {} \; |
Recursively finds all files in root folder and prints all strings with 'text-to-find-here' from that files, ignoring binary files. | find / -type f -exec grep -l "text-to-find-here" {} \; |
Recursively finds all files in root folder and prints all strings with 'text-to-find-here' from that files, preceding matched string with filename. | find ~/ -type f -exec grep -H 'text-to-find-here' {} \; |
recursively finds all files newer than a date | find . -type f -newermt "$(date '+%Y-%m-%d %H:%M:%S' -d @1494500000)" |
Recursively finds all files not like *.itp, *ane.gro, *.top in a current folder and removes them. | find . -depth -type f -not -name *.itp -and -not -name *ane.gro -and -not -name *.top -exec rm '{}' + |
Recursively finds all files older than 7 minutes under the current directory, saves list of found files, and compresses them, executing at most 10 compress process at a time. | find . -type f -mtime +7 | tee compressedP.list | xargs -I{} -P10 compress {} & |
Recursively finds all files with whole word "pattern" in a current folder, and precedes found string with its number in file. | grep -rnw `pwd` -e "pattern" |
Recursively finds all folders in a current folder that contain files like '.git'. | find . -name '.git' | xargs dirname |
Recursively finds and compresses all files in a current folder. | find . -type f -exec bzip2 {} + |
Recursively finds and compresses all files in a current folder with 4 parallel processes. | find . -type f -print0 | xargs -0 -n1 -P4 bzip2 |
Recursively finds and compresses all files in the directory '/path/to/dir' | find /path/to/dir -type f -exec bzip2 {} \; |
Recursively find files in the current directory with a modification time more than 7 days ago, save the filenames to "compressedP.list", and compress no more than 10 at a time | find . -type f -mtime +7 | tee compressedP.list | xargs -I{} -P10 compress {} & |
Recursively finds files like '*.js', and filters out files with 'excludeddir' in path. | find . -name '*.js' | grep -v excludeddir |
Recursively finds files like 'example.com', ignoring case differences, and filters out files with 'beta' in path. | find -iname example.com | grep -v beta |
Recursively finds file some_file_name.xml file and prints strings with "PUT_YOUR_STRING_HERE" preceding each found string with file name. | find . -type f -name some_file_name.xml -exec grep -H PUT_YOUR_STRING_HERE {} \; |
Recursively finds in all folders but "./output/*" all files but *.o, *.swp and prints strings with 'soc_attach' text pattern and number of matched string. | find . \( ! -path "./output/*" \) -a \( -type f \) -a \( ! -name '*.o' \) -a \( ! -name '*.swp' \) | xargs grep -n soc_attach |
Recursively find the latest modified "zip" file in the current directory | find . -name "*zip" -type f | xargs ls -ltr | tail -1 |
Recursively find the latest modified file in the current directory | find . -type f -print0|xargs -0 ls -drt|tail -n 1 |
Recursively find the latest modified file in the current directory | find . -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" " |
Recursively find the latest modified file in the current directory | find . -type f | xargs ls -ltr | tail -n 1 |
Recursively find the latest modified file in the current directory and print the modification time and filename | find . -type f -printf '%TY-%Tm-%Td %TH:%TM: %Tz %p\n'| sort -n | tail -n1 |
Recursively finds string 'class foo' in all *.c files from current folder. | grep "class foo" **/*.c |
Recursively find strings in all files under current directory, that matching with comma-separated patterns list in file 'searches-txt' | cat searches.txt| xargs -I {} -d, -n 1 grep -r {} |
Recursively finds strings like "texthere" in all "*.txt" files of a current folder. | grep -r --include "*.txt" texthere . |
Recursively finds strings with 'word-1' or 'word-2' in any file under 'directory-path', following symlinks, and prints found strings. | egrep -R "word-1|word-2” directory-path |
Recursively finds string with text "foo" in all files of a current folder. | find ./ -type f | xargs grep "foo" |
Recursively finds strings with the whole word 'word-1' or 'word-2' in any file under 'directory-path', following symlinks, and prints found strings. | egrep -w -R "word-1|word-2” directory-path |
Recursively finds strings with"text string to search” in any file within the 'directory-path', following symlinks, and prints found strings with file names. | grep -r -H "text string to search” directory-path |
Recursively finds strings with"text string to search” in files under 'directory-path', regarding provided options '[option]'. | grep [option] "text string to search” directory-path |
Recursively findsfiles with text pattern in current folder, ingnoring case differences, prefixes each matched line with number in file and suppresses error messages about nonexistent or unreadable files. | grep -insr "pattern" * |
Recursively lists all files in a current folder in long format. | ls -ld $(find .) |
Recursively lists all files in a current folder in long format, sorting by modification time. | ls -ldt $(find .) |
Recursively list contents of the current directory in a tree-like format | tree |
Recursively move all files in "/path/to/srcdir" to "dest/" | find /path/to/srcdir -type f -print0 | xargs -0 -i% mv % dest/ |
Recursively prints .txt files in current directory | find $(pwd) -name \*.txt -print |
Recursively print all directories in the current directory tree | tree -d |
Recursively print all files and directories in the current directory tree | tree . |
Recursively print all files and directories in the directory tree "$absolute/path/of/your/dir" | tree $absolute/path/of/your/dir |
Recursively prints all files in a current folders, and searches "stringYouWannaFind" in file content ignoring case differences, and preceding found string with its number in file. | find ./ -type f -print -exec grep -n -i "stringYouWannaFind" {} \; |
Recursively prints all folders in a current folder that contain files like "*.class". | find . -name "*.class" -print0 | xargs -0 -n1 dirname | sort --unique |
Recursively removes $TMPDIR folder, prompting user on each deletion. | rm -r $TMPDIR |
Recursively removes 'classes' folder, prompting user on each deletion. | rm -r classes |
Recursively remove all "*.txt" files and answer "n" to any prompt | yes n | rm -r *.txt |
Recursively remove all "*.txt" files and answer "y" to any prompt | yes | rm -r *.txt |
Recursively removes all empty folders from the X folder. | find X -depth -type d -exec rmdir {} \; |
Recursively removes all empty folders under current folder. | find -depth -type d -empty -exec rmdir {} \; |
Recursively removes all empty folders under current folder. | find . -depth -type d -empty -exec rmdir {} \; |
Recursively removes all empty folders under current path, printing info message on each operation, and suppressing error messages if folder is not empty. | find -type d -empty -exec rmdir -vp --ignore-fail-on-non-empty {} + |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.