mlocate - what is it good for?

Seth Arnold seth.arnold at canonical.com
Thu May 23 00:40:53 UTC 2019


On Wed, May 22, 2019 at 09:47:22PM +0200, Julian Andres Klode wrote:
> I think mlocate only really makes sense on data storage servers with
> huge disks, or on machines with HDDs. I therefore do not think the
> overhead of building the index is warranted for most users. It might
> make sense to keep mlocate in always-on tasks, like servers, but get
> rid of it from desktop scenarios.

In my early days of using Linux, I used locate dozens of times a day. I
might know the filename but not the pathname, or a part of a filename,
etc.

"locate XF86Config" was way easier than "find / -name '*XF86Config*' -print".

Sure, the find command is simpler today, but it still spews loads of
useless error messages unless you also add 2> /dev/null. (And maybe
you care about some but not all errors. Unlikely but possible.)

Now that I'm far more familiar with where files live I no longer
use locate for this purpose. Now I fall firmly in the other camp,
where locate is annoyingly slow and I will try my hand at writing a
replacement someday:

$ time locate thisdoesntexist

real	1m29.294s
user	1m27.649s
sys	0m1.644s

Anyway, I believe locate can have great value to all our users,
experienced or brand new, huge systems or small systems. I'd like
us to keep it in default installs.

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20190522/756a6d06/attachment-0001.sig>


More information about the ubuntu-devel mailing list