nl stringlengths 13 387 | bash stringlengths 1 532 |
|---|---|
Find all *.c files in /usr/src bigger than 100k | find /usr/src -name '*.c' -size +100k -print |
Find all *.c files located under /home and below | find /home -name "*.c" |
Find all *.c files on the system and feed the output to wc | find / -name *.c | wc |
Find all *.c files under /home | find /home -name "*.c" |
Find all *.c files under and below the current directory that contain "hogehoge" | find . -name \*.c | xargs grep hogehoge |
Find all *.c files under and below the current directory that contain "wait_event_interruptible" | find . -name \*.c -exec grep wait_event_interruptible {} + |
Find all *.c files under and below the current directory that contain "wait_event_interruptible" | find . -name \*.c -exec grep wait_event_interruptible {} /dev/null \; |
Find all *.c files under and below the current directory that contain "wait_event_interruptible" | find . -name \*.c -print | xargs grep wait_event_interruptible /dev/null |
Find all *.c files under and below the current directory that contain "wait_event_interruptible" | find . -name \*.c -print0 | xargs -0 grep wait_event_interruptible /dev/null |
Find all *.cgi files/directories under current directory and change their permission to 775 | find . -name '*.cgi' -print0 | xargs -0 chmod 775 |
find all the *.conf files under / (root) | find / -name "*.conf" |
Find all *.cpp files in the current directory tree that contain "sub" in their names | find . -name "*sub*.cpp" |
Find all *.css files under /starting/directory and print filenames and the lines matching the regex '\.ExampleClass' from those files | find /starting/directory -type f -name '*.css' | xargs -ti grep '\.ExampleClass' {} |
Find all *.csv files under /foot/bar/ and move them to some_dir | find /foot/bar/ -name '*.csv' -print0 | xargs -0 mv -t some_dir |
find all *.csv files which modify within last 2 days in /home directory then zip ( archive )- | find /home/archive -type f -name "*.csv" -mtime -2 -exec gzip -9f {} \; |
Find all *.data files under jcho directory | find jcho -name *.data |
Find all *.dbf files/directories in entire file system | find / -name "*.dbf" |
Find all *.dbf files/directories in entire file system and print their sorted and unique parent directory paths | find / -name \*.dbf -print0 | xargs -0 -n1 dirname | sort | uniq |
Find all *.err files under current directory that are larger than 5120 bytes in size | find . -type f -size +10 -name "*.err" |
Find all *.ext files/directories under current directory and print their path and parent directory path | find /path -type f -name "*.ext" -printf "%p:%h\n" |
Find all *.foo files under current directory and print their contents | cat $(find . -name '*.foo') |
Find all *.foo files under current directory and print their contents | cat `find . -name '*.foo' -print` |
Find all *.foo files under current directory and print their contents | find . -name '*.foo' -exec cat {} + |
Find all *.foo files under current directory and print their contents | find . -name '*.foo' -exec cat {} \; |
Find all *.foo files under current directory and search for 'bar' in those files | find . -name '*.foo' -exec grep bar {} \; |
Find all *.gz files/directories under asia and emea directory | find asia emea -name \*.gz |
Find all *.gz files/directories under asia and emea directory | find asia emea -name \*.gz -print0 | xargs -0 |
Find all *.gz files in the current directory and decompress them using gunzip | find . -name '*.gz' -print0 | xargs -0 gunzip |
Find all *.htm files under current directory | find -type f -name "*.htm" |
Find all *.html files under current directory | find . -type f -name '*.html' |
Find all *.ini files | find . -name *.ini |
Find all *.java files under current directory | find . -name "*.java" |
Find all *.java files under current directory containing the string 'String' | find . -name "*.java" -exec grep "String" {} \+ |
Find all *.java files under current directory containing the string 'String' | find . -name "*.java" -exec grep "String" {} \; |
Find all *.jpg files in */201111 paths | find */201111 -name "*.jpg" |
Find all *.jpg files in */201111/* paths and numerically sort them according to the second field in the file name with a delimiter '_' | find */201111/* -name "*.jpg" | sort -t '_' -nk2 |
Find all *.jpg (case insensitive) files under current directory | find . -iname '*.jpg' |
Find all *.jpg files under current directory | find . -name *.jpg |
Find all *.jpg files under current directory and print only duplicate names | find . -name \*.jpg -exec basename {} \; | uniq -d |
Find all *.jpg files under current directory and print only unique names | find . -name *.jpg | uniq -u |
Find all *.jpg files under current directory and print only unique names | find . -name \*.jpg -exec basename {} \; | uniq -u |
Find all *.log files under current directory that contain the string "Exception" | find . -name '*.log' -mtime -2 -exec grep -Hc Exception {} \; | grep -v :0$ |
Find all *.log files under path/ | find path/ -name "*.log" |
Find all *.log files under path/ that do not contain "string that should not occur" | find path/ -name '*.log' -print0 | xargs -r0 grep -L "string that should not occur" |
Find all *.m4a files/directories under /home/family/Music directory | find /home/family/Music -name '*.m4a' -print0 |
Find all *.m4a files/directories under /home/family/Music directory | find /home/family/Music -name *.m4a -print0 |
Find all *.m4a files under /home/family/Music directory | find /home/family/Music -type f -name '*.m4a' -print0 |
Find all *.mov files under current directory | find . -name "*.mov" |
Find all *.mov (case insensitive) files under current directory and list their paths with their names | find . -iname "*.mov" -printf "%p %f\n" |
Find all *.mp3, *.aif*, *.m4p, *.wav, *.flac files under $musicdir directory | find "$musicdir" -type f -print | egrep -i '\.(mp3|aif*|m4p|wav|flac)$' |
Find all *.mp3 (case insensitive) files/directories under /tmp and remove them | find /tmp -iname '*.mp3' -print0 | xargs -0 rm |
Find all *.mp3 files in entire file system greater than 10MB and delete them | find / -type f -name *.mp3 -size +10M -exec rm {} \; |
Find all *.mp3 files in file system with more than 10MB and delete them using rm command | find / -type f -name *.mp3 -size +10M -exec rm {} \; |
Find all *.mp3 files under current directory | find . -name *.mp3 |
Find all *.mp4 files under /working | find /working -type f -name '*.mp4' |
Find all *.mp4 files under directory named 'working' and show the first one found | find working -type f -name "*.mp4" | head -1 |
Find all *.ogg and *.mp3 (case insensitive) files/directories under your home directory | find $HOME -iname '*.ogg' -o -iname '*.mp3' |
Find all *.ogg (case insensitive) files/directories in entire file system | sudo find / -iname '*.ogg' |
Find all *.ogg (case insensitive) files/directories under your home directory | find $HOME -iname '*.ogg' |
Find all *.ogg (case insensitive) files/directories under your home directory that are greater than 100MB in size | find $HOME -iname '*.ogg' -size +100M |
Find all *.ogg (case insensitive) files/directories under your home directory that are greater than 20MB in size | find $HOME -iname '*.ogg' -size +20M |
Find all *.ogg (case insensitive) files/directories under your home directory that are not greater than 20MB in size | find $HOME -iname '*.ogg' ! -size +20M |
Find all *.ogg files on the system ignoring the case | find / -iname '*.ogg' |
Find all *.old files and move them to directory oldfiles | find . -name "*.old" -exec mv {} oldfiles \; |
Find all *.p[lm] files/directories under current directory | find -name '*.p[lm]' |
Find all *.p[lm] files under /users/tom directory that matches both the regex '->get(' and '#hyphenate' in their contents | find /users/tom -name '*.p[lm]' -exec grep -l -- '->get(' {} + | xargs grep -l '#hyphenate' |
Find all *.p[lm] files under /users/tom directory that matches the regex '->get(\|#hyphenate' in their contents | find /users/tom -name '*.p[lm]' -exec grep -l -- '->get(\|#hyphenate' {} + |
Find all *.page (case insensitive) files/directories under current directory and run ~/t.sh for each of them with the file path as argument, then sort the output | find . -iname *.page -exec ~/t.sh {} \; | sort |
Find all *.pdf files under ./polkadots | find ./polkadots -type f -name "*.pdf" |
Find all *.pdf.marker files under ${INPUT_LOCATION} and move them to ${OUTPUT_LOCATION} also move any *.pdf files with the same name under current directory to ${OUTPUT_LOCATION} | find ${INPUT_LOCATION}/ -name "*.pdf.marker" | xargs -I file mv file $(basename file .marker) ${OUTPUT_LOCATION}/. |
Find all *.php (case insensitive) and *.js files (case insensitive) under /home/jul/here excluding /home/jul/here/exclude/* paths | find /home/jul/here -type f \( -iname "*.php" -o -iname "*.js" \) ! -path "/home/jul/here/exclude/*" |
Find all *.php (case insensitive) files and *.js files/directories (case insensitive) under /home/jul/here excluding $EXCLUDE/* paths | find /home/jul/here -type f -iname "*.php" ! -path "$EXCLUDE/*" -o -iname "*.js" ! -path "$EXCLUDE/*" |
Find all *.php (case insensitive) files and *.js files/directories (case insensitive) under /home/jul/here excluding *.js files/directories under /home/jul/here/exclude/* paths | find /home/jul/here -type f -iname "*.php" -o -iname "*.js" ! -path "/home/jul/here/exclude/*" |
Find all *.php (case insensitive) files and *.js files/directories (case insensitive) under /home/jul/here excluding /home/jul/here/exclude/* paths | find /home/jul/here -type f -iname "*.php" ! -path "/home/jul/here/exclude/*" -o -iname "*.js" ! -path "/home/jul/here/exclude/*" |
Find all *.php files under current directory and change their permission to 640 | chmod 640 $(find . -name *.php) |
Find all *.php files under current directory and change their permission to 644 | find . -type f -name '*.php' -exec chmod 644 {} \; |
Find all the *.pl files (Perl files) beneath the current directory. | find . -name "*.pl" |
Find all *.plist files/directories under current directory | find -name \*.plist |
Find all *.plist files/directories under current directory | find . -name \*.plist |
Find all *.plist files/directories under current directory | find ./ -name "*.plist" |
Find all *.py files/directories under current directory | find . -name *.py |
Find all *.py files/directories under current directory | find . -name \*.py -print |
Find all *.py files under and below the current directory and search them for "xrange" | find . -name '*.py' -exec grep --color 'xrange' {} + |
Find all *.py files under current directory | find . -type f -name "*.py" |
Find all *.py files under current directory and search for regular expressions taken from the search_terms.txt file | find . -name '*.py' -exec grep -n -f search_terms.txt '{}' \; |
Find all *.rb and *.py files/directories under current directory | find . -name "*.rb" -or -name "*.py" |
Find all *.rb files/directories under current directory | find . -name "*.rb" |
Find all *.rb files/directories under current directory | find . -name '*.rb' |
Find all *.rb files/directories under current directory | find . -name *.rb |
Find all *.rb files/directories under current directory | find . -name \*.rb |
Find all *.rb (regular) files under current directory | find . -name "*.rb" -type f |
Find all *.rb (regular) files under current directory and change their mode to 600 | find . -name "*.rb" -type f -exec chmod 600 {} \; |
Find all *.rb (regular) files under current directory and count their line numbers | find . -name "*.rb" -type f -exec wc -l \{\} \; |
Find all *.rb (regular) files under current directory and count their line numbers | find . -name "*.rb" -type f | xargs wc -l |
Find all *.rb (regular) files under current directory and count their line numbers ensuring white space safety on file name/path. | find . -name "*.rb" -type f -print0 | xargs -0 wc -l |
Find all *.rb (regular) files under current directory and print them on stdout putting the file name/path in-between two string literals 'Hello,' and '!' | find . -name "*.rb" -type f | xargs -I {} echo Hello, {} ! |
Find all *.rb (regular) files under current directory ensuring white space safety and print at most two file names/paths per line | find . -name "*.rb" -type f -print0 | xargs -0 -n 2 echo |
Find all *.sh files owned by user vivek | find / -user vivek -name "*.sh" |
Find all *.swp files/directories under current directory | find . -name "*.swp" |
Find all *.tar.gz files/directories under /directory/whatever which were modified more than $DAYS ago | find /directory/whatever -name '*.tar.gz' -mtime +$DAYS |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.