YannickN.fr
YannickN.fr

Reputation: 360

How to launch automatically updatedb (for locate) at startup on Debian?

I need to update manually locate with sudo updatedb before to use it, obviously!

But with "Linux Mint" for example it's done automatically at each startup and it's very convenient because it's enough for most of your daily searches. :o)

However I don't know how it's scheduled or how it works.

How can I convince "Debian" to do the same?

Upvotes: 2

Views: 958

Answers (1)

Almir Arnautovic
Almir Arnautovic

Reputation: 11

Try to use mlocate instead of locate:

sudo apt-get remove locate
sudo apt-get install mlocate

After installation, you may wish to run /etc/cron.daily/mlocate by hand to create the database, otherwise mlocate won't work until that script is run from cron itself (since mlocate does not use the same database file as standard locate). See packages.debian.org/stretch/mlocate for details

Upvotes: 1

Related Questions