Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How important is mlocate, on a personal desktop distro? What important apps/services rely on it to function properly? It seems I/O these days is probably fast enough, and the desire to see actual files, and not a cached database, practically render locate unneeded?
Many distributions do not even install mlocate anymore. If the typical user does not have much CLI experience then I assume they will just use the file browser for their searches.
If you want to find a file quickly and know it has not been recently updated using locate is easy.
find is a great tool but can get complex quickly and can be confusing for users who do not use the CLI and just want a quick search.
I use it exclusively. Having had very bad experiences with the indexers - gnome tracker primarily - I make efforts to disable them on every install. Re-running the updatedb is trivial in my case, so I have always disabled the timed task if installed as well.
After the initial search any subsequent ones are quite responsive as everything is in vfs cache, and it has the advantage of being realtime rather than point in time like locatedb. It's also more focussed as my locatedb covers a much wider set of directories.
IMO both approaches have a role to play.
Like syg00 I've had bad experiences with the desktop indexers, and now refuse to go anywhere near them.
find is slow, there is a tool called fd which is much faster and more efficient. (and by the way, I do not really use it so often, that caching is not really helpful)
$ time -p locate Solsbury
/local/library/audio/CDs/Peter Gabriel/1977 - Peter Gabriel 1/02 - Solsbury Hill.flac
real 0.18
user 0.18
sys 0.00
$ time -p qf Solsbury
/local/library/audio/CDs/Peter Gabriel/1977 - Peter Gabriel 1/02 - Solsbury Hill.flac
real 0.05
user 0.04
sys 0.00
$
That's quick enough for me, and I have enough ram for the dirents to hang around in cache for a very long time.
I still like to use locate, but on my Macintosh I had to turn-off most of the features of their "Spotlight Search" because the daemon was consuming way too many resources updating its databases. Once the initial "locate" database is built, it doesn't take too much time to keep it updated ... usually in the dead of night.
I use locate a lot. It's much easier to use than find and has the advantage that it searches substrings by default, so you don't need to have the correct filename.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.