Updated: 11 October 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12
The find command searches folders for files by name, size, date and more.
find . -name "*log*" # names containing "log"
find /home -name "*.pdf" # all PDFs under /home
find . -type f -size +100M # files larger than 100 MB
find . -type f -mtime -1 # changed in the last 24 hours
find . -name "*.tmp" -delete # delete matching files (careful!)
find . -name "*.pdf" -exec ls -lh {} \; # run a command on each result
Tip: Run a find command without -delete first, to see what it matches.