Print filename and line number
Show file and line number for each match
grep -rn 'panic:' /var/log/app/
- tool
- grep15 commands
More grep commands
-
rg 'TODO|FIXME|HACK' --type py -lList files containing TODO/FIXME/HACK in Python files
-
rg 'panic' -C3 --glob '*.go'3 lines of context around matches in Go files
-
rg 'secret_key' --hidden --no-ignoreSearch hidden and .gitignore'd files
-
rg 'old_value' --replace 'new_value' --passthru config.yamlPreview how a replacement would look without writing
-
rg 'error' /var/log/ --stats 2>&1 | tail -5Show total matches, files searched, elapsed time