25

OS: Ubuntu 19.10

When I ran locate plymouth, I got

dkb@dkb-uee:~$ locate plymouth

Command 'locate' not found, but can be installed with:

sudo apt install mlocate

dkb@dkb-uee:~$ 

So I installed mlocate and now locate works.

As far as I can remember, since Ubuntu 11.04, locate has always been there.

Why was it excluded in Ubuntu 19.10?

DK Bose
  • 42,548
  • 23
  • 127
  • 221

1 Answers1

34

There was this thread: mlocate - what is it good for? with this:

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 ...

This initial post called for opinions on the matter.

Later, in the same thread, there's this:

My own sense is that this is not a server vs desktop thing; there are users of locate, to be sure, but I believe they are a very small minority on both desktop and server (small on desktop because the user will generally use the gui instead; small on server because most server use is not interactive at the shell). I don't think the benefit of having locate available by default justifies the daily disk thrashing / energy usage on every Ubuntu machine everywhere. I think it's not onerous for those who want to use locate to manually install it the first time they need it on a machine.

And this:

Well, I don't think this is an argument for keeping mlocate installed by default on desktops, because effectively this means that you have TWO indexers on your desktop system - both tracker and mlocate. It looks like nautilus currently depends on tracker, so I'm not sure how one would uninstall it and usefully fall back to the mlocate backend anyway, but at most I'd say this should be expressed as 'Depends: tracker | mlocate' in nautilus, and not have mlocate kept around on the system updating its database daily just in case a user removes tracker.

The bottom line is that if you want it, just install it.

Kulfy
  • 17,696
DK Bose
  • 42,548
  • 23
  • 127
  • 221
  • 2
    What's the GUI alternative, is it as fast as locate and does it not have the same drawbacks? – Eric Duminil Oct 26 '19 at 09:34
  • 2
    @EricDuminil I'm not sure any GUI alternative would be as fast. And, I've seen more than a fair number of complaints about GNOME's tracker and KDE Plasma's baloo hogging CPU. I have only quoted, and very partially at that, the arguments for not including mlocate. There are several posts there that didn't agree. – DK Bose Oct 26 '19 at 10:21
  • 3
    "small on server because most server use is not interactive at the shell" What?? How else do you manage servers? – RonJohn Oct 26 '19 at 15:18
  • "disk thrashing" meh home users should be on SSDs by now! – Lightness Races in Orbit Oct 26 '19 at 20:22
  • 2
    @RonJohn Most server use is the consumption of that server's services. Of course you have to administer the server, and you'll do that at the shell, but if you're spending more time administering the server than people are spending actually consuming the services, you may wish to ask whether it's economical to run the server in the first place. That, or your administration is kind of broken. – Lightness Races in Orbit Oct 26 '19 at 20:23
  • @LightnessRacesinOrbit how many resources does a nightly mlocate database refresh take? (Not many!) – RonJohn Oct 27 '19 at 00:56
  • @RonJohn I don't necessarily disagree with that, but it has nothing to do with your previous comment – Lightness Races in Orbit Oct 27 '19 at 01:15
  • @LightnessRacesinOrbit what does "if you're spending more time administering the server than people are spending actually consuming the services" have to do with whether or not mlocate is installed? – RonJohn Oct 27 '19 at 01:29
  • @RonJohn Absolutely nothing. I was responding to your exclamation of shock at the news that most server use is not interactive at the shell. – Lightness Races in Orbit Oct 27 '19 at 01:33
  • Also, suid/sgid stuff (especially with a history of information disclosure problems) that serves no known purpose on a server is no good. If it is an interactive tool nobody explicitly feels the need to install or request installed on a given server, that means it serves no known purpose on that server. Also, by some strict interpretations, a tool that can inadvertently delay the inaccessibility of a directory index IS an information disclosure problem in itself. – rackandboneman Oct 28 '19 at 19:36
  • I don't mind the "disk thrashing". I have cron run sudo updatedb every 15 minutes even though I might only use locate command about once a day on average. – WinEunuuchs2Unix Nov 10 '19 at 04:46