When comparing The Silver Searcher vs locate, the Slant community recommends locate for most people. In the question“What are the best desktop search tools for Linux?” locate is ranked 1st while The Silver Searcher is ranked 2nd. The most important reason people chose locate is:
locate updates its database usually daily and from there it can retrieve matching file names almost instantly.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Speed
The Silver Searcher is lightning fast.
Pro Idiot proof
"ag searchterm" - it's that simple in its purest form.
Pro Support VCS ignore files
Ag can speed up by ignoring files matched by pattern in ".agignore" (deprecated), ".ignore" (since ag-v0.33.0), and VCS ignore files (.gitignore, .git/info/exclude, .hgignore, svn:ignore).
Pro Good overview of results
Grouped by file, highlighted with background color, linenumbers by default
Pro Near instant file name matching
locate updates its database usually daily and from there it can retrieve matching file names almost instantly.
Pro Installed by default on most distributions
The "locate" command is probably already installed and setup on your Linux. Just run it.
Pro Regexp option
Uses the extended POSIX regex.
Cons
Con Cannot search inside files' content
Locate only search by file name and has no knowledge of their content. Yet it can be mixed together with tools like xargs
and grep
to look inside content of possibly relevant files quickly.