mlocate - what is it good for?

cdmiller cdmiller at adams.edu
Thu Jun 20 15:12:34 UTC 2019


On 5/22/19 12:59 PM, Brian Murray wrote:
> The Ubuntu Foundations team was recently looking at an issue with
> mlocate[1] and the effect it has on all users of Ubuntu. While that
> specific issue is fixable there are also issues[2,3] with keeping
> PRUNEFS and PRUNEPATHS current in updatedb.conf. So we ended up
> questioning the usefulness of installing mlocate by default on systems
> at all. We believe that find is an adequate replacement for mlocate but
> want to hear from you about use cases where it may not be. I'll start
> with a personal example:
> 
> "I don't remember (because I need to know so infrequently) where the
> meta-release file is cached on disk by update-manager and use locate to
> find it. The find command itself is inadequate because the cached file
> exists in both /home and /var."
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880507
> [2] http://launchpad.net/bugs/827841
> [3] http://launchpad.net/bugs/1823518
> 
> Thanks,
> --
> Brian Murray
> 

Couldn't resist obligatory late reply to the "vi vs emacs" style
discussion :)

I'm older so I use find.  The find habit is ingrained from a need
for cross platform compatibility when managing pre-linux and early
linux systems.  In my experience locate is more cumbersome as my
typical need is to search a subtree for file(s), and sometimes a
file is not yet in the mlocate database.  Another use case is the
running of commands on sets of files by names, dates, etc., find is
often sufficient, if not then xargs.

My colleagues and I prefer the minimal approach for servers
installing items as needed from a small base install.  In the recent
past using cloud images our config management removed packages to
achieve the desired state.  Items such as snap, lxc, and even some
cloud config features were not wanted on our base VMs.  At present
we use Ubuntu minimal and build up from there.

Is the mlocate system used for any housekeeping scripts other than
building the mlocate database?  If not we could live without it on
default installs.

Thanks,

- cameron



More information about the ubuntu-server mailing list