How to find files and directories
Overview
find walks a directory tree and tests every item against conditions. Start in a narrow directory to keep output and runtime manageable.
Examples
find ~/Documents -name 'notes.txt'
find . -iname '*.jpg'
find . -type d -name 'backup*'
find ~/Downloads -type f -size +100M
Useful tests
-namematches case-sensitively;-inameignores case-type fselects files;-type dselects directories-maxdepth 2limits traversal depth-mtime -7selects items modified in the last seven days-size +100Mselects items larger than 100 MiB
Tips and safety
Quote wildcard patterns so the shell does not expand them before find sees them. Add 2>/dev/null only if you understand that it hides error messages.
Preview matches before combining find with deletion or other modifying actions.