Search & Find

Find a file by name

$ find / -iname "[query]"
copy

Find all path names containing a phrase

$ locate [query]
copy

Find the path of an executable

$ which [command]
copy

Find location of binary/source/man files for a command

$ whereis [command]
copy

Search for pattern in output of command

$ history | grep [phrase]
copy

Find modified files since last 60 minutes

$ find / -mmin -60
copy

Find changed files since last 60 minutes

$ find / -cmin -60
copy

FInd all files which are accessed 7 days back

$ find / -atime 7
copy

Search for pattern in file

$ grep [query] [file]
copy

Find all files which are greater than 10MB and less than 100MB

$ find / -size +10M -size -100M
copy
Copied to clipboard
Coindodo