Are these related?
Which is faster?
Can either be limited to directory-names?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Ripgrep (rg) and Silver Searcher (ag) both perform text searches, and both are created to be a better and faster
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"
ag -G '\.cpp$' 'foo'
To limit search to a directory, add path to the command:
ag "bar" /etc/ rg "bar" /etc/