Search only in file type grep
Limit recursive search to .py files only
grep -r --include='*.py' 'import os' /srv/app/
more grep
all 15 commands →
Exclude directories
grep -r --exclude-dir='.git' --exclude-dir='node_modules' 'TODO' .
Print filename and line number
grep -rn 'panic:' /var/log/app/
ripgrep fast search
rg 'TODO|FIXME|HACK' --type py -l
ripgrep with context
rg 'panic' -C3 --glob '*.go'
ripgrep search in hidden files
rg 'secret_key' --hidden --no-ignore