From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

ripgrep is search tool that can recursively search directories for regex search patterns. ripgrep can replicate much of the functionality of the grep command, but has a generally wider scope.


USE flags

USE flags for sys-apps/ripgrep a search tool that combines the usability of ag with the raw speed of grep

debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
pcre Add support for Perl Compatible Regular Expressions


Install sys-apps/ripgrep:

root #emerge --ask sys-apps/ripgrep



To view ripgrep usage and options:

user $rg --help

Search for a string in current directory

To recursively search files in the current directory for a string:

user $rg <string>

Find a string in a file

Use ripgrep to find a string in a file:

user $rg <string> <file>



Remove sys-apps/ripgrep:

root #emerge --ask --depclean --verbose sys-apps/ripgrep

See also

  • grep — a tool for searching text files with regular expressions