When comparing GNU findutils 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 GNU findutils is ranked 4th. 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 Free and installed by default on most distros
Available out of the box on most linux distributions
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 No indexing and slow content search
Needs to be extended with commands like grep and becomes slow for large files or large numbers of files
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.