nl
stringlengths 13
387
| bash
stringlengths 1
532
|
|---|---|
Finds all the log* files recursively in /myDir that are more than 7 days older and compresses them.
|
find /myDir -name "log*" -ctime +7 -exec bzip2 -zv {} \;
|
Find all Makefile's in the current directory tree
|
find -type f -name "Makefile"
|
Find all Makefile's in the current directory tree and look for line 235 in each of them
|
find . -name Makefile -print0 | xargs -0 grep -nH $ | grep :235:
|
find all the mp3 files in the current folder and move them to another folder
|
find . -name "*.mp3" -exec mv {} "/Users/sir/Music//iTunes/iTunes Media/Automatically Add to iTunes.localized/" \;
|
find all the mp3 files in the entire file system whose size is bigger than 10MB
|
find / -type f -name *.mp3 -size +10M -exec rm {} \;
|
find all the mp3 files in the file system
|
find / -iname "*.mp3" -print
|
Find all MP3 files in the home directory tree that were modified in the last 24 hours
|
find ~ -type f -mtime 0 -iname '*.mp3'
|
find all the mp3 files in the home folder which have been modified today
|
find ~ -type f -mtime 0 -iname '*.mp3'
|
Find all MP3s in the /home directory tree
|
find /home -type f -name '*.mp3'
|
Find all mysong.ogg files/directories under your home directory
|
find $HOME -name 'mysong.ogg'
|
find all the non compressed files in the current directory and compress them.
|
find . \! -name "*.Z" -exec compress -f {} \;
|
find all the normal files in the home directory which have been accesed in the last 30 days with the size greater than or equal to 100k.
|
find $HOME -type f -atime +30 -size 100k
|
Find all of the character devices on the system
|
find / -type c
|
find all of the executable files on your computer
|
find / -executable
|
Find all of jzb's files
|
find -user jzb
|
Find all OGG files in the home directory larger than 20 megabytes
|
find $HOME -iname '*.ogg' -size +20M
|
Find all OGG files in the home directory that are at most 20 megabytes in size
|
find $HOME -iname '*.ogg' ! -size +20M
|
Find all or single file called FindCommandExamples.txt under / directory of owner root
|
find / -user root -name FindCommandExamples.txt
|
Find all or single file called tecmint.txt under the / directory of owner root
|
find / -user root -name tecmint.txt
|
Find all orm* files/directories under current directory
|
find . -name 'orm*'
|
Find all orm.* files/directories under current directory
|
find . -name "orm.*"
|
find all the patch files in current folder and copy them to separate folder patches
|
find -name '*.patch' -print0 | xargs -0 -I {} cp {} patches/
|
Find all pdf files excluding *_signed.pdf files under /some/dir with null character as the delimiter
|
find /some/dir -name "*.pdf" ! -name "*_signed.pdf" -print0
|
find all pdf files in the current folder
|
find . -name “*.pdf” -print
|
Find all pdf files under /dir/containing/unsigned with null character as the delimiter
|
find /dir/containing/unsigned -name '*.pdf' -print0
|
find all PDFs owned by user “seamstress”
|
find / -user seamstress -iname “*.pdf”
|
find all the perl files in the current folder
|
find . -type f -name "*.pl"
|
find all the perl files in the current folder, print0 is used to handle files with new lines in their names or only spaces
|
find . -type f -name "*.pl" -print0
|
Find all Perl source code files
|
find . -name "*.pl"
|
Find all php files in the current directory
|
find . -type f -name "*.php"
|
Find all PHP files in the current directory recursively
|
find . -name \*.php -type f
|
Find all PHP files in the current directory recursively and search them for string "$test" with 8 simultaneous processes
|
find . -name \*.php -type f -print0 | xargs -0 -n1 -P8 grep -Hn '$test'
|
find all the php files in the current folder
|
find . -name \*.php
|
find all the php files in the current folder
|
find . -name “*.[php|PHP]” -print
|
find all the php files in the current folder (discards any directory which has an extension of ".php")
|
find . -name \*.php -type f
|
find all the php files in current folder and search for multiple patterns in these files
|
find -name '*.php' -exec grep -li "fincken" {} + | xargs grep -l "TODO"
|
find all the php files in current folder and search for multiple patterns in these files and display the file names
|
find -name '*.php' -exec grep -in "fincken" {} + | grep TODO | cut -d: -f1 | uniq
|
find all the php files in current folder using regular expressions
|
find . -regex '.+\.php'
|
Find all php files that belong to user 'takuya' and have been modified in the last 1 day
|
find -user takuya -name '*.php' -daystart -mtime -1
|
Find all PHP files under current directory
|
find . -type f -name *.php
|
Find all php files under current directory
|
find . -type f -name "*.php"
|
Find all PHP files under current directory that contain only one line
|
find . -type f -name '*.php' -exec wc -l {} \; | egrep "^\s*1\s"
|
Find all php files whose name is tecmint.php in a current working directory
|
find . -type f -name tecmint.php
|
Find all php files whose name is tecmint.php in the current directory
|
find . -type f -name tecmint.php
|
find all the php/javascript files in current folder using regular expressions
|
find . -regex '.+\.\(php|js\)'
|
Find all PNG and JPG files and append them to archive `images.tar'
|
find . \( -iname "*.png" -o -iname "*.jpg" \) -print -exec tar -rf images.tar {} \;
|
find all png files in the current folder
|
find . -type f -name '*.png'
|
find all the png files in the current folder which are present in the pattern list search .txt
|
find . -name '*.png' | grep -f search.txt
|
Find all python files (.py files) in $topdir directory tree and search for 'Makefile' in all these folders and display all distinct folders having 'Makefile'
|
find "$topdir" -name '*.py' -printf '%h\0' | xargs -0 -I {} find {} -mindepth 1 -maxdepth 1 -name Makefile -printf '%h\n' | sort -u
|
Find all python files under current directory tree, save the list to 'output.txt' and search for 'something' in those files
|
find . -name '*.py' | tee output.txt | xargs grep 'something'
|
find all raw images in the current folder and pass them one at a time to the xargs command and enable parallel processing of the files
|
find . -type f -iname '*.CR2' -print0 | xargs -0 -n 1 -P 8 -I {}
|
find all read me files in a folder
|
find /usr/share/doc -name README
|
Find all Read Only files
|
find / -perm /u=r
|
Find all read only files in /home directory
|
find /home -type f -perm /u=r
|
Find all Read Only files in entire file system and show a few lines of output from the beginning
|
find / -perm /u=r | head
|
Find all Read Only files in the file system
|
find / -perm /u=r
|
find all readme files in a folder
|
find /usr/share/doc -name README
|
find all regex ".*/[a-f0-9\-]\{36\}\.jpg" files
|
find . -regextype sed -regex ".*/[a-f0-9\-]\{36\}\.jpg"
|
find all regex "./[a-f0-9\-]\{36\}\.jpg" files
|
find . -regex "./[a-f0-9\-]\{36\}\.jpg"
|
find all regex '\./[a-f0-9\-]\{36\}\.jpg' files
|
find . -regex '\./[a-f0-9\-]\{36\}\.jpg'
|
find all the reguar/normal php files in current directory.
|
find . -type f -name "*.php"
|
Find all regular *.css files
|
find . -type f -name "*.css"
|
Find all regular .abc files under and below /the/path and rename them prefixing their names with "version_1"
|
find /the/path -type f -name '*.abc' -execdir rename 's/\.\/(.+)\.abc$/version1_$1.abc/' {} \;
|
Find all regular .html files in the /var/www directory tree
|
find /var/www -type f -name "*.html"
|
Find all regular .mp3 files larger than 10M and delete them
|
find / -type f -name *.mp3 -size +10M -exec rm {} \;
|
Find all regular files 1 level down the $dir directory
|
find $dir -maxdepth 1 -type f
|
find all regular file and create jw-htmlfiles.tar
|
find . -type f -name "*html" | xargs tar cvf jw-htmlfiles.tar -
|
find all regular files then display the number of occurrences of banana without lines not proper end
|
find . -type f -print0| xargs -0 grep -c banana| grep -v ":0$"
|
find all regular files exclude .o and exclude *.swp and output line number of soc_attach if it has
|
find . \( ! -path "./output/*" \) -a \( -type f \) -a \( ! -name '*.o' \) -a \( ! -name '*.swp' \) | xargs grep -n soc_attach
|
Find all regular files in the "$dir" directory
|
find $dir -maxdepth 1 -type f
|
Find all regular files in the "aaa" directory
|
find aaa/ -maxdepth 1 -type f
|
Find all the regular files in $DIR directory tree which have not been modified in the last 15 days and delete them
|
find "$DIR" -type f -mtime +15 -exec rm {} \;
|
Find all the regular files in $DIR directory tree which have not been modified in the last 450 days and delete them
|
find $DIR -type f -mtime +450 -exec rm {} \;
|
find all the normal/regular files in /etc/sysconfig which have been accesses in the last 30 minutes
|
find /etc/sysconfig -amin -30 -type f
|
find all the regular/normal files in the /path folder and delete them
|
find /path -type f -delete
|
find all the regular/normal files in the /path folder and delete them
|
find /path -type f -exec rm '{}' \;
|
find all the regular/normal files in the /path folder and delete them
|
find /path -type f -print0 | xargs -0 rm
|
Find all regular files in the /path/to/base/dir tree
|
find /path/to/base/dir -type f
|
Find all regular files in /usr/bin accessed more than 20 days ago
|
find /usr/bin -type f -atime +20
|
Find all regular files in /usr/bin modified less than within the last 10 days
|
find /usr/bin -type f -mtime -10
|
find all the regular/normal files in all the directories in the /some/dir and delete them
|
find /some/dir -type d -exec find {} -type f -delete \;
|
Find all regular files in and below the home directory that have been modified in the last 90 minutes
|
find ~ -type f -mmin -90
|
find all the regular/normal files in the current direcoty which have not been accessed in the last 30 days.
|
find . -type f -atime +30 -print
|
Find all regular files in the current director and set their permissions to '644'.
|
find ./ -type f -exec chmod 644 {} \;
|
find all normal/regular files in the current directory
|
find . -type f -print
|
find all the normal/regular files in the current directory
|
find -type f
|
Find all regular files in the current directory and its subdirectories.
|
find . -type f
|
find all the regular/normal files in the current directory and print them skip searching all the directories in the current folders.
|
find * -type f -print -o -type d -prune
|
find all the normal/regular files in the current directory and search for the word mail and display the file names
|
find . -type f -exec grep -il mail
|
Find all regular files in the current directory and search them for "example"
|
find -maxdepth 1 -type f | xargs grep -F 'example'
|
Find all regular files in the current directory tree, except GIT files
|
find . -name .git -prune -o -type f -print
|
Find all regular files in the current directory tree ignoring directory ./source/script
|
find . -path ./source/script -prune -o -type f -print;
|
Find all regular files in the current directory tree ignoring GIT and SVN directories
|
find . \( -type d -regex '^.*/\.\(git\|svn\)$' -prune -false \) -o -type f -print0
|
Find all regular files in the current directory tree last modified between 1 and 3 days ago and list them using find's -ls option
|
find ./ -daystart -mtime -3 -type f ! -mtime -1 -exec ls -ld {} \;
|
Find all regular files in the current directory tree last modified between 1 and 3 days ago and list them using format '%TY %p\n'
|
find ./ -daystart -mtime -3 -type f ! -mtime -1 -printf '%TY %p\n'
|
Find all regular files in the current directory tree last modified between 1 and 3 days ago and list them using format '%Tc %p\n'
|
find ./ -daystart -mtime -3 -type f ! -mtime -1 -printf '%Tc %p\n'
|
Find all regular files in the current directory tree last modified between 1 and 3 days ago and list them using format '%Tm %p\n'
|
find ./ -daystart -mtime -3 -type f ! -mtime -1 -printf '%Tm %p\n'
|
Find all regular files in the current directory tree that are not readable by all
|
find -type f ! -perm -444
|
Find all regular files in the current directory tree that are not readable by anyone
|
find . -type f ! -perm -444
|
Find all regular files in the current directory tree that have been modified within the last 10 minutes
|
find . –type f -mmin -10
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.