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

Notices

Reply
 
Search this Thread
Old 07-28-2004, 12:16 PM   #1
King of Japan
Member
 
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?

Anyhoo.

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.

Thanks.
 
Old 07-28-2004, 12:43 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,983
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
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
developers).


Cheers,
Tink
 
Old 07-28-2004, 02:04 PM   #3
King of Japan
Member
 
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, 11:21 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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 11:26 AM.
 
Old 08-29-2004, 01:35 PM   #5
King of Japan
Member
 
Registered: Jul 2003
Location: Lincoln Nebraska
Distribution: Redhat 9
Posts: 61

Original Poster
Rep: Reputation: 15
Thank you Mr.

Will try.
 
  


Reply


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


All times are GMT -5. The time now is 04:28 PM.

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