Find files by name
find /path/to/search -name "*.log"
Find files modified in last 7 days
find /var/log -type f -mtime -7
Find and delete files
Dangerous: Always test without -delete first!
find /tmp -name "*.tmp" -type f -delete
Find large files (> 100MB)
find / -type f -size +100M
Grep with line numbers
grep -n "error" app.log
Grep recursively in directory
grep -r "TODO" /project/src/
Grep with context (3 lines before/after)
grep -C 3 "exception" app.log
Case-insensitive grep
grep -i "warning" app.log
Grep for multiple patterns
grep -E "error|fatal|critical" app.log
Find + Grep combo
Search for "database" inside all .js files.
find . -name "*.js" -exec grep -l "database" {} \;