rg
Ripgrep, a recursive line-oriented search tool. tldr-pages
On several platforms
Several platforms
Ripgrep, a recursive line-oriented search tool. Aims to be a faster alternative to grep.
Recursively search current directory for a pattern (regex)
rg patternIdentifyRecursively search for a pattern in a file or directory
rg pattern path/to/file_or_directoryIdentifySearch for a literal string pattern
rg --fixed-strings -- stringIdentifyInclude hidden files and entries listed in .gitignore
rg --hidden --no-ignore patternIdentifyOnly search the files matching the glob pattern(s) (e.g. README.*, use !filename_pattern to exclude instead)
rg pattern --glob 'filename_glob_pattern'IdentifyRecursively list filenames in the current directory and highlight ones that match a pattern
rg --files | rg --passthrough patternIdentifyOnly list matched files (useful when piping to other commands)
rg --files-with-matches patternIdentifyShow lines that do not match the pattern
rg --invert-match patternIdentify