nl stringlengths 13 387 | bash stringlengths 1 532 |
|---|---|
Find all files/directories named $something under current directory | find -name "$something" |
Find all files/directories named '.todo' under $STORAGEFOLDER directory tree and print their parent paths | find "$STORAGEFOLDER" -name .todo -printf '%h\n' |
Find all files/directories named 'Desktop' under current directory | find ./ -name Desktop |
Find all files/directories named 'FindCommandExamples.txt' that belong to the user 'root' in the entire filesystem | find / -user root -name FindCommandExamples.txt |
Find all files/directories named 'Waldo' under 'Books' directory tree that is located in user's home directory | find ~/Books -name Waldo |
Find all files/directories named 'apt' in the entrie filesystem | find / -name "apt" |
Find all files/directories named 'articles.jpg' under '/home/username/public_html/images' directory tree | find /home/username/public_html/images -name "articles.jpg" |
Find all files/directories named 'articles.jpg' under 'images' directory tree | find images -name "articles.jpg" |
Find all files/directories named 'articles.jpg' under current directory tree | find . -name "articles.jpg" |
Find all files/directories named 'com.apple.syncedpreferences.plist' (case insensitive) under ~/Library directory tree | find ~/Library/ -iname "com.apple.syncedpreferences.plist" |
Find all files/directories named 'date' under /usr | find /usr -name date |
Find all files/directories named 'document' in the entire filesystem | find / -name document -print |
Find all files/directories named 'document' in maximum 4 levels down the '/usr' directory | find /usr -maxdepth 4 -name document -print |
Find all files/directories named 'document' in the root filesystem partition | find / -xdev -name document -print |
Find all files/directories named 'file' and print them with null character as the delimiter instead of newline | find -name file -print0 |
Find all files/directories named 'file' without descending into directories with the same name under current directory tree | find -name file -prune |
Find all files/directories named 'file_name' under current directory tree | find . -name file_name |
Find all files/directories named 'filename' that belong to user 'username' and group 'groupname' in the entire filesystem | find / -user username -group groupname -name filename |
Find all files/directories named 'findcommandexamples.txt' (case insensitive) in the entire filesystem | find / -iname findcommandexamples.txt |
Find all files/directories named 'foo' in the entire filesystem | find / -name foo |
Find all files/directories named 'foo' under current directory tree without descending into directories named 'foo' | find . -name foo -type d -prune -o -name foo |
Find all files/directories named 'foo.bar' in the entire filesystem | find / -name foo.bar -print |
Find all files/directories named 'foo.bar' under './dir1' and './dir2' directory trees | find ./dir1 ./dir2 -name foo.bar -print |
Find all files/directories named 'foo.rb' under current directory tree | find . -name foo.rb |
Find all files/directories named 'fprintf.c' under '/usr/src' directory tree | find /usr/src -name fprintf.c |
Find all files/directories named 'game' under current directory tree | find . -name game |
Find all files/directories named 'java' under /usr directory | find /usr -name java |
Find all files/directories named 'javac' under current directory | find . -name 'javac' |
Find all files/directories named 'my.txt' in the entire filesystem | find / -name "my.txt" |
Find all files/directories named 'myfile' under your home directory | find ~ -name myfile |
Find all files/directories named 'pattern' under current directory tree | find . -name "pattern" -print |
Find all files/directories named 'photo?.jpg' under current directory tree | find . -name photo\?.jpg |
Find all files/directories named 'query' (case insensitive) under current directory | find -iname "query" |
Find all files/directories named 'query' under current directory | find -name "query" |
Find all files/directories named 'query' (case insensitive) under current directory tree | find -iname "query" |
Find all files/directories named 'query' under current directory tree | find -name "query" |
Find all files/directories named 'test' under current directory tree | find . -name test |
Find all files/directories named 'testfile.txt' under current directory tree | find . -name testfile.txt |
Find all files/directories named 'text' under current directory | find -name "text" |
Find all files/directories named 'top' (case insensitive) in the entire filesystem | find / -iname top |
Find all files/directories named 'top' in the entire filesystem | find / -name top |
Find all files/directories named 'vimrc' in the entire filesystem | find / -name vimrc |
Find all files/directories named 'имя_файла' in the entire filesystem | find / -name "имя_файла" |
Find all files/directories named file in 2 and 3 levels down the current directory | find -mindepth 2 -maxdepth 3 -name file |
Find all files/directories named file in minimum 4 levels down the current directory | find -mindepth 4 -name file |
Find all files/directories named modules under current directory | find . -name modules |
Find all files/directories named orm.properties in entire file system | sudo find / -name "orm.properties" |
Find all files/directories named orm.properties under /eserver6 directory | find /eserver6 -name "orm.properties" |
Find all files/directories named orm.properties under /eserver6/share/system/config/cluster directory | find /eserver6/share/system/config/cluster -name "orm.properties" |
Find all files/directories named orm.properties under current directory | find . -name "orm.properties" |
Find all files/directories named Root under current directory and copy them to newRoot | find . -name Root | xargs cp newRoot |
Find all files/directories newer than ttt or owned by user 'wn' in entire file system | find / \( -newer ttt -or -user wnj \) -print |
Find all files/directories not with the name 'query_to_avoid' under current directory | find -not -name "query_to_avoid" |
Find all files/directories not with the name 'query_to_avoid' under current directory | find \! -name "query_to_avoid" |
Find all files and directories on the system whose name is `filedir' | find / -name filedir |
Find all files/directories owned by the user 'bob' under '/home' directory tree | find /home -user bob |
Find all files/directories owned by user 'joebob' under '/some/directory' directory tree | find /some/directory -user joebob -print |
Find all files and directories starting from the current directory | find . |
Find all files/directories starting with 'app-' and ending with '.log' in their names and have been modified in the last 5 minutes | find /var/log/crashes -name app-\*\.log -mmin -5 |
Find all files/directories starting with 'onlyme' in their names under current directory tree in minimum 1 level deep | find . -mindepth 1 -name 'onlyme*' |
Find all files/directories startring with 'onlyme' in their names under current directory without going into sub-directories | find . -maxdepth 1 -name 'onlyme*' |
Find all files/directories starting with 'readme' (case insensitive) under '/usr/share/doc' directory tree | find /usr/share/doc -name '[Rr][Ee][Aa][Dd][Mm][Ee]*' |
Find all files/directories that are bigger than 100 bytes under '/home/apache' directory tree | find /home/apache -size 100c -print |
Find all files/directories that are newer than 'backup.tar.gz' by modification time | find . -newer backup.tar.gz |
Find all files/directories that are newer than 'ttt' by modification time or owned by the user 'wnj' in the entire filesystem | find / \( -newer ttt -or -user wnj \) -print |
Find all files/directories that are owned by user 'dave' under current user's home directory tree | find ~ -user dave -print |
Find all files/directories that are owned by user 'takuya' under current directory tree | find -user takuya |
Find all files/directories that are owned by user 'wnj' and are newer than 'ttt' by modification time in the entire filesystem | find / -newer ttt -user wnj -print |
Find all files and directories that have been modified in the last seven days. | find . -mtime -7 |
find all files and directories that have been modified in the last seven days | find . -mtime -7 |
Find all files/directories that belong to the group 'accts' under '/apps' directory tree | find /apps -group accts -print |
Find all files/directories that belong to the group 'audio' under '/dev' directory tree | find /dev -group audio |
Find all files/directories that belong to the group 'staff' under '/usr' directory tree | find /usr -group staff |
Find all files/directories that contain 'packet' (case insensitive) in their names excluding directories that are bigger than 1500 bytes in size | find . -iregex ".*packet.*" ! -type d -size +1500c |
Find all files/directories that contain 'target' (case insensitive) in their names under current directory no-recursively | find -maxdepth 1 -iname "*target*" |
Find all files/directories that contain the string literal '$VERSION' in their names under current directory tree | find . -name '*$VERSION*' |
Find all files/directories that do not belong to any user under '/home' directory tree | find /home -nouser -print |
Find all files/directories that do not contain 'photo' in their names under current directory tree | find . ! -name "*photo*" |
Find all files and directories that do not match the pattern given as the $controlchars variable | find . ! -name "$controlchars" |
Find all files/directories that have read, write, execution permission for user and belong to the user 'my_user' under current directory tree | find . -user my_user -perm -u+rwx |
Find all files/directories that start with 'a1a2' and end with 'txt' in their names and move their parent directories to '/home/spenx/dst/' directory | find /home/spenx/src -name "a1a2*txt" | xargs -n 1 dirname | xargs -I list mv list /home/spenx/dst/ |
Find all files/directories that start with 'onlyme' in their names under maximum 2 levels down the current directory | find . -maxdepth 2 -name 'onlyme*' |
Find all files/directories that start with 'readme' (case insensitive) in their names under '/usr/share/doc' directory tree | find /usr/share/doc -name '[Rr][Ee][Aa][Dd][Mm][Ee]*' |
Find all files/directories that start with 'test' in their names under current directory tree | find . -name 'test*' |
Find all files/directories under $1 which have at least write permission for their owner and set write permission for group for these files/directories | find "$1" -perm -u+w -print0 | xargs chmod g+w |
Find all files/directories under $1 which have at least write permission for their owner and set write permission for group for these files/directories | find $1 -perm -u+w -exec chmod g+w {} \; |
Find all files/directories under $TARGET_DIR directory tree matching the posix extended regular expression \".*/$now.*\" (where $now is a variable) and save the output in file $FILE_LIST | find $TARGET_DIR -regextype posix-extended -regex \".*/$now.*\" -fprint $FILE_LIST |
Find all files/directories under $dir directory | find "$dir" |
Find all files/directories under $dir directory tree which have been modified in the last 3 days | find $dir -mtime -3 |
Find all files/directories under '/abs/path/to/directory' directory non-recursively that match the pattern '.*invalidTemplateName.*' in their names | find /abs/path/to/directory -maxdepth 1 -name '.*invalidTemplateName.*' |
Find all files/directories under '/directory_path' directory tree that have been modified within the last day | find /directory_path -mtime -1 -print |
Find all files/directories under '/home/exampleuser/' directory tree whose names end with 'conf' and were modified exactly 3 days ago | find /home/exampleuser/ -name "*conf" -mtime 3 |
Find all files/directories under '/home/user/' directory tree whose status was changed exactly 10 minitues ago | find /home/user/ -cmin 10 -print |
Find all files/directories under '/home/user/' directory tree whose status were changed 10 minutes ago | find /home/user/ -cmin 10 -print |
Find all files/directories under '/usr' directory tree that have not been modified in the last 356 days counting days from today | find /usr -mtime +356 -daystart |
Find all files/directories under '/usr/local' containing 'blast' (case insensitive) in their names | find /usr/local -iname "*blast*" |
Find all files/directories under '/usr/local/games' directory tree that contain the string 'xpilot' in their names | find /usr/local/games -name "*xpilot*" |
Find all files/directories under '/usr/share/data' directory tree that match the posix extended regex ".*/20140624.*" in their paths and save the list to '/home/user/txt-files/data-as-of-20140624.txt' | find /usr/share/data -regextype posix-extended -regex ".*/20140624.*" -fprint /home/user/txt-files/data-as-of-20140624.txt |
Find all files/directories under '/usr/share/doc' directory tree that contain 'readme' (case insensitive) at the beginning of their names | find /usr/share/doc -iname readme\* |
Find all the files/directories under '/var/adm' directory tree that have not been modified in the last 3 days | find /var/adm -mtime +3 -print |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.