2006-01-12

Keeping the locate database fresh on FC4

In the default Fedora Core 4 installation, the locate database does not get updated automatically. If you haven't manually updated the database, you will see error messages like this:

foo:/home/kasper$ locate foobar
warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old
warning: Please make sure the daily cron job is enabled in /etc/updatedb.conf
foo:/home/kasper$

To manually update the locate database, type this at a shell prompt:

$ sudo locate -u

To enable nightly locate database updates, edit file /etc/updatedb.conf. In that file, change

# Set DAILY_UPDATE to yes to enable running updatedb
DAILY_UPDATE=no

to

# Set DAILY_UPDATE to yes to enable running updatedb
DAILY_UPDATE=yes

The locate database will stay up to date, and you'll always be happy.

No comments:

LinkWithin

Related Posts with Thumbnails