Are these related?

Which is faster?

Can either be limited to directory-names?




Ripgrep (rg) and Silver Searcher (ag) both perform text searches, and both are created to be a better and faster grep.

Performance-wise, both appear to be similar, although benchmarks indicate that Ripgrep is faster in many cases (https://blog.burntsushi.net/ripgrep/).

With the rising popularity of Ripgrep, it has been integrated into MS Visual Code (Visual Studio Code March 2017).

Feature-wise, both seem very similar. Command are also very similar as well.


rg "foo" -g "*.cpp"

Silver Searcher:

ag -G '\.cpp$' 'foo'

To limit search to a directory, add path to the command:

ag "bar" /etc/  
rg "bar" /etc/
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.