User login

locate command's database not updating: PENDING SOLUTION

warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old

"locate" uses a database, slocate.db, of filesystem and directory information. It should be updated daily by a cron job. This message means that it isn't updating for some reason.

Check in /etc/cron.daily/ for slocate.cron and make sure it is executable and all that.

cd /etc/cron.daily
ls -l

-rw-r--r-- 1 root root 418 Sep 29 14:51 00-makewhatis.cron
-rwxr-xr-x 1 root root 180 Sep 29 14:51 logrotate
-rw-r--r-- 1 root root 104 Sep 29 14:51 rpm
-rw-r--r-- 1 root root 121 Sep 29 14:51 slocate.cron
-rwxr-xr-x 1 root root 100 Jan 19 2006 tetex.cron
-rw-r--r-- 1 root root 286 Sep 29 14:51 tmpwatch
-rwxr-xr-x 1 root root 158 Aug 12 14:40 yum.cron

Running the "updatedb" command as root will solve the problem in most cases.

warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old

"locate" uses a database, slocate.db, of filesystem and directory information. It should be updated daily by a cron job. This message means that it isn't updating for some reason.

Check in /etc/cron.daily/ for slocate.cron and make sure it is executable and all that.

cd /etc/cron.daily
ls -l

-rw-r--r-- 1 root root 418 Sep 29 14:51 00-makewhatis.cron
-rwxr-xr-x 1 root root 180 Sep 29 14:51 logrotate
-rw-r--r-- 1 root root 104 Sep 29 14:51 rpm
-rw-r--r-- 1 root root 121 Sep 29 14:51 slocate.cron
-rwxr-xr-x 1 root root 100 Jan 19 2006 tetex.cron
-rw-r--r-- 1 root root 286 Sep 29 14:51 tmpwatch
-rwxr-xr-x 1 root root 158 Aug 12 14:40 yum.cron

Running the "updatedb" command as root will solve the problem in most cases.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.