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-28-2004, 01:16 PM   #1
King of Japan
Registered: Jul 2003
Location: Lincoln Nebraska
Distribution: Redhat 9
Posts: 61

Rep: Reputation: 15
Quick slocate/updatedb question?

I'm running Redhat 9 with a default install.
Now that that's out of the way;

The slocate/updatedb is a fine and dandy, and a rather handy little thingie.
However, It just seems to randomly kick off after boot everyday (I know it's supposed to do this) after an hour to two hours. Why the randomness?


The problem is I burn a lot of CDs and I don't want it to kick off while I'm in the process of burning. I'm afraid it will screw up the CD's since updatedb brings my system to a crawl.

So if I just do a slocate -c right after boot will that tell the cron job that updatedb has already ran and it won't run again for 24 hours so I can be sure it's safe to burn some CDs?

Does the updatedb redo the db from scratch or does it only make changes to the db that correspond to the changes made on the harddrive?

I'm just thinking if I do a slocate -c after boot it will try to completely redo and overwrite the current db instead of just updating the current one which might take a long time.

Essentially will a slocate -c behave the same (If indeed this is the right command) as letting the cron job do it the way it does by default?

Hope I made a bit of sense here.

Old 07-28-2004, 01:43 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
If it's random it's not cron, but maybe anacron,
but that may vary, if it's not random but you just
don't turn the machine on at the same time all
the time ...

The easiest way to find out what the cron-job
does would be to look at it ;)

Commonly it does a updatedb -c

As for the question whether it re-writes the data-
base every time, or whether it updates it: I wouldn't
know, would have to look at the source (or ask the

Old 07-28-2004, 03:04 PM   #3
King of Japan
Registered: Jul 2003
Location: Lincoln Nebraska
Distribution: Redhat 9
Posts: 61

Original Poster
Rep: Reputation: 15
Thanks for the input.

Points well taken.

I guess I could also just run it and see what happens.

Probably move the current updatedb somewhere and run it, play around with it and see what happens.
Old 08-29-2004, 12:21 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Locate the updatedb command entry in your cron or anacron table and make it 'nice'. Precede the command with the command 'nice +13' to lower the priority level of the updatedb command.

The anacron table is /etc/anacrontab
You can view the man pages, man 8 anacron or man 5 anacrontab.

Or you could stop the anacron service before you burn your CDs.
'/sbin/service anacron stop' as root.

Last edited by jschiwal; 08-29-2004 at 12:26 PM.
Old 08-29-2004, 02:35 PM   #5
King of Japan
Registered: Jul 2003
Location: Lincoln Nebraska
Distribution: Redhat 9
Posts: 61

Original Poster
Rep: Reputation: 15
Thank you Mr.

Will try.


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
Got a question about slocate code neo_in_matrix Programming 3 03-28-2005 09:09 PM
updatedb and slocate runs at 5am, how can I change this? Archeantus Linux - Software 4 02-12-2005 06:06 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 05:36 PM
updatedb all question JC404 Linux - Newbie 1 08-14-2003 11:48 AM
really dumb shell question.. (slocate) NGraphiX Linux - General 5 09-18-2002 07:51 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 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