Search binary files grep
Treat binary as text (-a) to search process memory
grep -a 'password' /proc/<pid>/mem 2>/dev/null | strings | head -20
more grep
all 15 commands →
Extended regex alternation
grep -E '(ERROR|WARN|CRIT)' app.log | tail -50
Recursive case-insensitive search
grep -ri 'error' /var/log/
Show context lines
grep -B3 -A5 'FATAL' app.log
Count matches
grep -c 'POST /api' /var/log/nginx/access.log
Print only matched part
grep -oP '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' access.log | sort -u