LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-13-2006, 03:13 PM   #1
jraclarke
Member
 
Registered: May 2006
Location: Farnham, Surrey, UK (Chile until Dec 2011)
Distribution: Fedora Core 14
Posts: 32

Rep: Reputation: 15
Can I run updatedb on startup?


Hi Everyone

Pretty new to Linux, but enjoying getting into it!

I'm running Fedora Core 4 on my machine.

As I'm not on linux all the time the updatedb never seems to run as the cron daily is early in the morning. I would change this to a more suitable time, however I can never predict when I will be using linux. So...

1) Is is possible to run updatedb when I log on?

2) Would I be able to do this for all users (not just root)?

3) Can I exclude the any directories from this update (perhaps the ones which never get altered using PRUNEPATHS etc.)?

Any help would be appreciated.

Clarkey
 
Old 06-13-2006, 04:43 PM   #2
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
1: Yes, but updatedb takes minutes to run, you can put it in one of Fedora's startup files in /etc/rc.d, I am not sure of the exact structure of Fedora because every distro varies a little.

2: What do you mean "to do this for all users"? Only root needs to be able to run updatedb if done at boot, otherwise you can change the permissions for 'updatedb' to allow users to search.

3: updatedb --prunepaths='/directories /you /want /to /exclude'

Last edited by juanbobo; 06-13-2006 at 04:50 PM.
 
Old 06-13-2006, 04:47 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,880

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
1) Yes you can run updatedb on boot. If you have a boot.local script (or whatever FC uses in /etc to control the secquence of events during boot), you can add the command to run updatedb as the last step before booting is complete (which would take care of question 2) as well because it takes place before logon).

3) If the PRUNEPATHS environment is set, updatedb will use that, otherwise you can set it with the updatedb option "--prunepaths= path1 path2 etc".

However, if you set updatedb to run on boot, be prepared to wait for the system to boot up, since completion of the boot sequence will be delayed by the amount of time it takes updatedb to run to completion.

Been there; done that! Won't do it again.
 
  


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
Why Do I need to run updatedb each time I search for a file or folder? lennysokol Linux - Software 4 05-30-2005 10:49 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
When i run rsync and updatedb: get LDAP authentication error topcat Linux - Software 1 11-21-2004 02:45 AM
Run updatedb as nobody? Phathead Slackware 2 10-14-2003 06:50 PM
Run on Startup? Paasan Linux - General 5 09-16-2002 10:37 AM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration