-   Mandriva (
-   -   Cron Entry tor updatedb? (

Snump 10-01-2004 04:43 PM

Cron Entry tor updatedb?
How does the cron directory work? If files on the hard drive change, which file should I put it in? Is there a consensus between everyone?

CroMagnon 10-01-2004 08:39 PM

Run updatedb via root's crontab, at whatever times are appropriate for you... I like to run it once a day at 5am when no-one will be using the computer (heavy disk access kills the responsiveness of my system). Since cron runs programs periodically, there's always going to be some sort of delay between adding new files and being able to find them with locate - the only way to avoid that is to run updatedb yourself if you've just added or moved files you want to find.

Snump 10-01-2004 11:22 PM

Like this?


# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
59 4 * * * root updatedb

What about running it at boot?

CroMagnon 10-02-2004 05:37 AM

That looks about right!

As for running at boot time, that depends on your system. Have a look in /etc/init.d for a script that sounds like it runs at boot time (e.g one of mine is

All times are GMT -5. The time now is 07:01 AM.