Advertisement

Find Command

Find files by name.

find /path -name "filename"
find /path -iname "filename"
find /path -type d -name "dirname"
find /path -type f -name "*.txt"
find . -name "*.log"

Find by Size

Search by file size.

find /path -size +100M
find /path -size -10k
find /path -size 50M

Find by Time

Search by modification time.

find /path -mtime -7
find /path -atime -7
find /path -ctime +30
find /path -mmin -60
Advertisement

Find and Execute

Perform actions on results.

find /path -name "*.tmp" -delete
find /path -name "*.txt" -exec cat {} \;
find /path -type f -exec chmod 644 {} \;

Find by Permissions

Search by file permissions.

find /path -perm 755
find /path -perm -644
find /path -perm /222

Find Empty Files

Find empty files or directories.

find /path -empty
find /path -type f -empty
find /path -type d -empty

Locate Command

Fast file search using database.

locate filename
locate -i filename
locate -c filename
sudo updatedb

Which Command

Find command location in PATH.

which python
which -a python

Whereis

Locate binary, source, manual.

whereis ls
whereis -b python
whereis -m gcc
Last updated: January 2026
Advertisement