nl
stringlengths 13
387
| bash
stringlengths 1
532
|
|---|---|
find all the files in the home folder which are less than 300Bytes
|
find ~ -size -300b
|
find all the files in the home folder which are less than 42 Bytes
|
find / -size 42
|
find all files in the home folder which are modified in the last 2 days.
|
find ~ -type f -mtime -2
|
find all the files in the home folder which have been modified after a file
|
find $HOME -newer ~joeuser/lastbatch.txt
|
find all files in home folder which have been modified after a timestamp
|
find ~ -newer /tmp/timestamp
|
find all files in the home folder which have been modified between 72 and 96 hours before
|
find ~ -mtime 2 -mtime -4 -daystart
|
find all the files in the home folder which have been modified in 1 year or more ( which are not modified in the last 1 year ).
|
find $HOME -mtime +365
|
find all the files in home folder which have been modified in the last 24 hours
|
find $HOME -mtime -1
|
find all the files in the home folder which have been modified in the last 24 hours
|
find $HOME -mtime -1
|
find all the files in the home folder which have been modified in the last 30 minutes
|
find $HOME -mmin -30
|
find all the files in the home folder which have been modified in the last 7 days
|
find $HOME -mtime -7
|
find all the files in the home folder which have been modified today
|
find ~ -type f -mtime 0
|
find all the files in the home folder which have not been modified in the last 1 year.
|
find $HOME -mtime +365
|
Find all files in the level 6 subdirecotries of /usr/src and below, ignoring CVS files
|
find /usr/src -name CVS -prune -o -mindepth +6 -print
|
Find all files in maximum 1 level down the current directory that were modified less than 1 day ago
|
find -maxdepth 1 -type f -mtime -1
|
Find all files in maximum 1 level down the current directory that were modified less than 1 day ago from today
|
find -maxdepth 1 -type f -daystart -mtime -1
|
find all the files in the present directory which have the group staff and check if is a symbolic link and display it.
|
find `pwd` -group staff -exec find {} -type l -print ;
|
Filnd all files in root directory with 777 permission and change permision 644 with chmod commad .
|
find / -type f -perm 777 -print -exec chmod 644 {} \;
|
find all the files in the root folder which have been modified in the last 24 hours and print them
|
find / -mtime -1 -print
|
Find all files in ~/clang+llvm-3.3/bin/ and print 'basename /file/path' for each file
|
find ~/clang+llvm-3.3/bin/ -type f -exec echo basename {} \;
|
Find all files larger than 100M and delete them
|
find / -size +100M -exec rm -rf {} \;
|
Find all files larger than 20000k
|
find / -type f -size +20000k
|
Find all files matching "abc*" in the current directory and append a column with "OK"
|
find . -name 'abc*' -exec echo {}' OK' \; | column -t
|
Find all files matching the pattern "${pattern}" in their name and execute ${my_command} for each of them with the file path as argument
|
find ${directory} -name "${pattern}" -print0 | xargs -0 ${my_command}
|
Find all files matching pattern '.#*' in the current directory tree
|
find -iname '.#*'
|
Find all files matching shell pattern "foo/bar" in the foo directory tree
|
find foo -path foo/bar -print
|
Find all files you have modified in the last two days
|
find ~ -type f -mtime -2
|
Find all files modified on the 7th of June, 2007, starting from the current directory
|
find . -type f -newermt 2007-06-07 ! -newermt 2007-06-08
|
finds all files modified within a certain time frame recursively
|
find . -type f -newermt "2013-06-01" \! -newermt "2013-06-20"
|
Find all files more than 700 megabytes
|
find / -size +700M
|
Find all files named "MyCProgam.c" (ignoring the case) and calculate each file's md5sum.
|
find -iname "MyCProgram.c" -exec md5sum {} \;
|
Find all files named "file.ext" in the current directory tree and print the path names of the directories they are in
|
find . -name "file.ext" -execdir pwd ';'
|
Find all files named "file.ext" in the current directory tree and print the path names of the directories they are in
|
find `pwd` -name "file.ext" -exec echo $(dirname {}) \;
|
Find all files named "file.ext" in the current directory tree and print the path names of the directories they are in
|
find `pwd` -name file.ext |xargs -l1 dirname
|
Find all files named "file.ext" within the current folder and print the path where each one is located
|
find `pwd` -name "file.ext" -exec dirname {} \;
|
Find all files named "file.ext" within the current folder and print the path where each one is located
|
find `pwd` -name "file.ext" -exec echo $(dirname {}) \;
|
Find all files named "filename"
|
find -name "filename"
|
Find all files named "filename" in the current directory tree, not descending into "FOLDER1" directories
|
find . '(' -name FOLDER1 -prune -o -name filename ')' -print
|
Find all files named "filename" in the current directory tree, not descending into "FOLDER1" directories
|
find . -name FOLDER1 -prune -o -name filename
|
Find all files named "foo_bar" in the current directory recursively
|
find -name foo_bar
|
Find all files named "something" in the current folder and below and run them through the ls -l command in a one batch.
|
find . -name something | xargs -0 ls
|
Find all files named 'Makefile' in the /usr/ports directory tree and count the number of lines in them beginning with USE_RC_SUBR
|
find /usr/ports/ -name Makefile -exec grep ^USE_RC_SUBR '{}' '+' | wc -l
|
Find all files named 'Makefile' in the /usr/ports directory tree and count the number of lines in them matching regular expression '^MASTER_SITE.*CPAN'
|
find /usr/ports/ -name Makefile -exec grep '^MASTER_SITE.*CPAN' '{}' '+' | wc -l
|
Find all files named 'Makefile' in the /usr/ports directory tree and count the number of lines in them matching regular expression '^MASTER_SITE_SUBDIR.*\.\./.*authors'
|
find /usr/ports/ -name Makefile -exec grep '^MASTER_SITE_SUBDIR.*\.\./.*authors' '{}' '+' | wc -l
|
Find all files named 'file' in 1 level down the current directory whose status were changed more than 1 day ago
|
find . -maxdepth 1 -ctime +1 -name file
|
Find all files named 'file' in 1 level down the current directory whose status were changed more than 1 hour ago
|
find . -maxdepth 1 -cmin +60 -name file
|
Find all files named `file1' on the system
|
find / -name file1
|
Find all files named `file1' starting from /
|
find / -name file1
|
Find all files named 'foo' under current directory tree without descending into directories named 'foo'
|
find . -name foo -type d -prune -o -name foo -print
|
Find all files named 'foo' under your home directory and list them with confirmation prompt
|
find ~ -type f -name 'foo*' -ok ls -l '{}' ';'
|
find all files named `linux' on the system
|
find / -name linux
|
Find all files named 'new' under current directory tree and display their contents
|
find . -name new -print -exec cat {} +
|
Find all files named 'new' under current directory tree and display their contents
|
find . -name new -print -exec cat {} \;
|
Find all files named 'test' in the current directory tree, not descending into "test" directories
|
find . -name test -prune
|
Find all files named 'text.txt' under current directory tree and display their contents
|
find . -name 'text.txt' -print -exec cat {} \;
|
Find all files newer than httpd.conf under and below the current directory
|
find . -newer httpd.conf
|
find all files not ending in ".html"
|
find . -type f -not -name "*.html"
|
Find all files of the user with UID=1000
|
find -uid 1000
|
Find all files of the user with UID=1000
|
find -user 1000
|
find all the files older than 30 days
|
find /tmp -mtime +30 -print
|
Find all files on the system that are larger than 600 MB
|
find / -size +600M -print
|
Find all files on the system that are world writeable
|
find / -perm -0002
|
Find all the files on the system that have been accessed within the last hour
|
find / -amin -60
|
Find all the files on the system that have been changed within the last hour
|
find / -cmin -60
|
Find all files on the system that have been modified in the last 10 minutes
|
find / -mmin -10
|
Find all the files on the system that have been modified within the last hour
|
find / -mmin -60
|
Find all files on the system whose names are 'autoload.php'
|
find / -name autoload.php
|
Find all files on the system whose names are 'composer.json'
|
find / -name composer.json
|
Find all files on the system whose names are 'drush'
|
find / -name drush
|
Find all files owned by group `group2'
|
find / -group group2
|
Find all files owned by group `root' in the current directory tree and change their user to `temp'
|
find . -group root -print | xargs chown temp
|
Find all files owned by user `comp'
|
find / -user comp
|
Find all files owned by the user daniel in the current directory and below.
|
find . -user daniel
|
Find all files owned by user vivek
|
find / -user vivek
|
Find all file paths under current directory, perform a reverse numerical sort and show first 10 file paths with their status change time
|
find . -type f -printf "%C@ %p\n" | sort -rn | head -n 10
|
Find all file paths under current directory, perform a reverse sort and show first 10 file paths with their status change time
|
find . -type f -printf "%C@ %p\n" | sort -r | head -n 10
|
find all files read less than 1 minute ago
|
find . -amin -1
|
Find all the files recursively in directories or files taken from the glob pattern /tmp/test/* that have been modified today
|
find /tmp/test/* -mtime -0
|
Find all files recursively starting from / that have been modified in the past 30 minutes and list them
|
find / -mmin -30 -ls
|
Find all files recursively which end in ".php"
|
find . -name "*.php" -print
|
Find all files residing in /home/dm/Video or below that were changed less than 7 days ago
|
find /home/dm/Video -mtime -7
|
Find all files residing in /home/dm/Video or below that were last changed at least 10 days ago
|
find /home/dm/Video -mtime +10
|
Find all files, starting from / but ignoring removable media, whose names end with ".rpm"
|
find / -xdev -name "*.rpm"
|
Find all files starting from / that belong to user1
|
find / -user user1
|
Find all files starting from / whose names end with ".rpm" and change their permissions to 755
|
find / -name *.rpm -exec chmod 755 '{}' \;
|
Find all files starting from the current directory that contain '.java' in their pathnames
|
find . -print | grep '\.java'
|
Find all files starting from the current directory which are exactly 100MB in size
|
find . -size 100M
|
Find all files starting from the current directory which are larger than 100MB
|
find . -size +100M
|
Find all files starting from the current directory which are smaller than 100MB
|
find . -size -100M
|
find all files starting with capital letter in the current folder
|
find . — name "[A‑Z]*" — print
|
find all the fles that have .ssh in the end and redirect the output to ssh-stuff
|
find / -name .ssh* -print | tee -a ssh-stuff
|
Find all files that have additional permissions
|
find / -perm -644
|
Find all files that are exactly 50 bytes
|
find / -size 50c
|
find all the files that are modified exactly one day ago
|
find -daystart -mtime 1
|
Find all files that are modified in last 3 days
|
find . -type f -mtime -3
|
find all the files that are modified in the last 7 days
|
find -daystart -mtime -7
|
find all the files that are not modified in the last 7 days
|
find -daystart -mtime +7
|
Find all the files that are not named "MyCProgram.c" in the current directory only and without regards to case.
|
find -maxdepth 1 -not -iname "MyCProgram.c"
|
find all files that are readable and writable by their owner
|
find . -perm -600 -print
|
find all files that are readable or writable by their owner
|
find . -perm +600 -print
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.