12/2/24, 10:13 Search & Find | Basic | Cheat sheet | Linux Command Library
LINUX COMMAND LIBRARY
BASICS TIPS COMMANDS
Search & Find
Find a file by name Find files whose status was
$ find / -iname "[query]" changed less than 60 minutes ago
$ fd [query] $ find / -cmin -60
Find all path names containing a FInd all files which are accessed 7
phrase days back
$ find / -atime 7
$ locate [query]
Find the path of an executable Search for pattern in file
$ grep [query] [file]
$ which [command]
Find location of binary/source/man Find all files which are greater than
files for a command 10MB and less than 100MB
$ whereis [command] $ find / -size +10M -size -100M
Search for pattern in output of Find files by extension
command $ fd -e [extension]
$ history | grep [phrase] $ find . -type f -name "*.[extension]"
$ locate "*.[extension]"
Find files whose content was
modified less than 60 minutes ago
$ find / -mmin -60
https://linuxcommandlibrary.com/basic/searchfind 1/2
12/2/24, 10:13 Search & Find | Basic | Cheat sheet | Linux Command Library
All man pages are copyrighted by their respective authors. Thanks to TLDR and commandlinefu.com
Simon Schubert - info@linuxcommandlibrary.com
My other projects:
https://linuxcommandlibrary.com/basic/searchfind 2/2