Share your knowledge at the LQ Wiki.
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 06-13-2006, 04:13 PM   #1
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.

Old 06-13-2006, 05:43 PM   #2
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 05:50 PM.
Old 06-13-2006, 05:47 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.


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 11:49 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 05:36 PM
When i run rsync and updatedb: get LDAP authentication error topcat Linux - Software 1 11-21-2004 03:45 AM
Run updatedb as nobody? Phathead Slackware 2 10-14-2003 07:50 PM
Run on Startup? Paasan Linux - General 5 09-16-2002 11:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 AM.

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