ripgrep Manual


About

  1. ripgrep (command: rg) is a line-oriented search tool that recursively searches your current directory for a regex pattern.

  2. It is much faster than grep

  3. Basic usage: rg <pattern>

  4. Matches lines with "foo" or "bar": rg "foo|bar"

  5. Disables regex, searches literally: rg -F "foo.bar"

  6. Only search in certain file types: rg "import" --type py

  7. Exclude search from certain file types: rg "main" --type-not cpp

  8. Search by file extension: rg "main" -g "*.cpp"

  9. ripgrep os usually 2x ~ 10x faster thant traditional grep:


  10. If you want to include everything: rg --no-ignore --hidden <pattern>

  11. Useful options