find
File ManagementSearch for files and directories in a directory hierarchy
Options & Flags
Available options for this command
-name patternSearch by filename pattern
-type f/dSearch for files (f) or directories (d)
-mtime nFind files modified n days ago
-size nFind files by size
Examples
Common usage examples
Find all .txt files in current directory and subdirectories
find . -name '*.txt'Find files in /var/log older than 30 days
find /var/log -type f -mtime +30Find log files larger than 100MB
find . -name '*.log' -size +100MNotes
- Very powerful when combined with -exec to perform actions on found files
- Use -iname for case-insensitive search
Related Commands
You might also find these useful