ripgrep with context
3 lines of context around matches in Go files
rg 'panic' -C3 --glob '*.go'
- tool
- grep15 commands
More grep commands
-
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
-
grep -a 'password' /proc/<pid>/mem 2>/dev/null | strings | head -20Treat binary as text (-a) to search process memory
-
grep -E '(ERROR|WARN|CRIT)' app.log | tail -50Match lines containing ERROR, WARN, or CRIT