Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 07-22-2004, 11:21 AM   #1
Registered: Jun 2004
Posts: 129

Rep: Reputation: 15
Why is updatedb running?


I am parnoid and a .

I keep seeing updatedb running as root when I do a ps -ef.

Is this normal?

I did a man updatedb ... but that didn't really answer my question.

Why would I (or anyone like a hacker) want to run updatedb?

Old 07-22-2004, 11:34 AM   #2
LQ Newbie
Registered: Jul 2004
Location: McKinney, TX
Distribution: MDK 10/KDE 3.2
Posts: 21

Rep: Reputation: 15
If you use "locate" to find stuff, locate uses a database instead of searching on the fly. updatedb is what runs to keep this database current.

I personally prefer "locate" over "find"...but that's just my opinion.
Old 07-22-2004, 11:44 AM   #3
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
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.
Old 07-22-2004, 03:01 PM   #4
Registered: Jun 2004
Posts: 129

Original Poster
Rep: Reputation: 15
So I don't "need" updatedb to run at all, right? I never use locate.
Old 07-22-2004, 03:26 PM   #5
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
Old 07-22-2004, 04:16 PM   #6
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
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.
Old 07-22-2004, 04:33 PM   #7
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 31
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.
Old 07-23-2004, 06:33 AM   #8
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
one last thing, 'updatedb' is a link to 'slocate' in /usr/bin therefore if you see slocate with a few options in cron.daily, that will be it!
Old 12-29-2004, 08:15 PM   #9
Registered: Oct 2004
Location: Queretaro Mexico
Distribution: SUSE 10.2
Posts: 51

Rep: Reputation: 15
Where to configure locate/updatedb?

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.

Thanks for the hint on the cron.daily thing.

Happy New Year

Last edited by energiza; 12-29-2004 at 08:51 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why updatedb is running by itself ??? small_boy22 Slackware 2 05-30-2005 12:10 PM
updatedb running too frequently lel800 Linux - Newbie 10 05-06-2005 05:28 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 05:36 PM
updatedb mikedeatworld Linux - Software 21 09-16-2004 11:59 PM
updatedb? nexx_au Fedora 2 04-06-2004 11:17 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration