Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
updatedb runs once a day by default (on slackware at least) to update the database - it shouldnt be running all the time. try looking in /etc for things related to 'cron', cron is a little daemon which sits there and runs programs at specified times, this is probably setup to run 'updatedb' periodically.
If you don't use locate then I suppose you don't need updatedb running. You can simply delete the slocate entry from /etc/cron.daily, but it doesn't really do much harm to leave it (unless it's interfering with something else) and you may want to use locate some day. It's much faster than find at searching for files by name.
If your machine is on 24 hours a day like most linux machines are (at least from my experience, most linux desktop users do seem to live their machine on) then running updatedb via cron at midnight (or whatever time you're not using your machine) is very useful, since this ensures your slocate database is fairly up to date :) - fast searching as mentioned above.
If your using swaret, locate is a command used to check dependancies if i recall correctly. So if you use that you probably want to keep the database up to date.
I was getting nuts in finding where the Locate/UpdateDB configure their autoexecution. On one side the man and GNU documentation of the FINDUTILS, seems to be out of date cause it shows "November 1994". I use SuSE Linux and the findutils package has to be requested during installation, as it's not installed by default.
Ok, once installed, yes, updatedb runs everyday to update the /var/lib/updatedb database, though, it's very annoying if you dont leave the machine on overnight; the updatedb runs automatically after boot as well, because of the /etc/cron.daily/updatedb script . Some sites mention an UPDATEDB.CONF file, but there is no such a thing, and I did not find a reference on the syntax of that file.
But the updatedb script in /etc/cron.daily does a validation at /etc/sysconfig/locate (which is the true configuration file and not updatedb.conf) and takes a bunch of variables from there, which determine wheather there will be an updatedb every day and with wich options of updatedb (those you do can find in either man, info --help for updatedb and in the /etc/sysconfig/locate file).
This way, you can manually run updatedb when you wish and avoid the auto thing by setting RUN_UPDATEDB=no in the configuration file OR move the updatedb script from cron.daily to cron.weekly with RUN_UPDATEDB=yes instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.