my locate command says database is more than 8days old
Dear all,
I tried to use locate to search for a file, but the following replied came out: warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old When I "man locate" it took me to the manual page of "slocate" and so I tried slocate to search for the file bu the same result came out. I can use find -name xxx -print to search for files but its sometimes not qutie effective and slow. any one knows the problem please correct me, Thanks in advance |
Re: my locate command says database is more than 8days old
Quote:
I've created a cron job to run updatedb every twelve hours, so I never have a problem with an out-of-date database. You might consider doing something like that if you use locate frequently, and frequently install new programs/download stuff. |
You must update the database which locate searches to find your files. Run updatedb to do this. It may take quite a while
|
Thanks
whipermr5 and drj000 Although I don't quite understand why but it worked, thank you very much for helping. |
Quote:
|
Ohooook,
thank you veyr much drj000! |
Re: Re: my locate command says database is more than 8days old
Quote:
|
Re: Re: Re: my locate command says database is more than 8days old
Quote:
Code:
0 6,18 * * * updatedb |
All times are GMT -5. The time now is 02:38 PM. |