Exclude directories
Search recursively skipping vcs and dependency dirs
grep -r --exclude-dir='.git' --exclude-dir='node_modules' 'TODO' .
More grep commands
-
grep -rn 'panic:' /var/log/app/Show file and line number for each match
-
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