rg
all
Ripgrep, a recursive line-oriented search tool. Aims to be a faster alternative to `grep`.
More info →Options (5)
-F, --fixed-stringsbooleanSearch for a literal string pattern
Example:
rg {{[-F|--fixed-strings]}} -- {{string}}--hiddenbooleanInclude hidden files and entries listed in `.gitignore`
Example:
rg {{[-.|--hidden]}} --no-ignore {{pattern}}-g, --globbooleanOnly search the files whose names match the glob pattern(s) (e.g. `README.*`)
Example:
rg {{pattern}} {{[-g|--glob]}} {{filename_glob_pattern}}-l, --files-with-matchesbooleanOnly list matched files (useful when piping to other commands)
Example:
rg {{[-l|--files-with-matches]}} {{pattern}}-v, --invert-matchbooleanShow lines that do not match the pattern
Example:
rg {{[-v|--invert-match]}} {{pattern}}Examples (8)
Recursively search current directory for a pattern (`regex`)
rg patternRecursively search for a pattern in a file or directory
rg pattern path/to/file_or_directorySearch for a literal string pattern
rg [-F|--fixed-strings] -- stringInclude hidden files and entries listed in `.gitignore`
rg [-.|--hidden] --no-ignore patternOnly search the files whose names match the glob pattern(s) (e.g. `README.*`)
rg pattern [-g|--glob] filename_glob_patternOnly list matched files (useful when piping to other commands)
rg [-l|--files-with-matches] patternShow lines that do not match the pattern
rg [-v|--invert-match] patternmade by @shridhargupta | data from tldr-pages