regarding "locate" command...
Hi All...
Good Morning ... When i am trying to locate a file xxxxx from a terminal i got a message like "database /var/lib/slocate/slocate.db' is more than 8 days old" .... i am not able to recognise a problem... any help would be appreciate.... infact this is the process done so far [root@redhat zam1]# locate Teradata.pdf warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old [root@redhat zam1]# i run "find " command successfullly.... but it takes a long time for searching.... any help would be appreciated... thnx in Advance... zameer ahmed syed. |
The way 'locate' works is to use a searchable database of the files on your computer - that's how it works so fast. But you have to keep the database up-to-date. To do that, run 'updatedb' as root. To make this happen automatically, you can put a script in /etc/cron.daily that looks like:
Code:
#!/bin/sh |
Thanx Wapcaplet...
U done a gr8 help for me.....now its working fine .... I am having negligible knowledge in script...if u don't mind could you plz tell me how to make it autoupdate (using script) step by step.. iam assumeing like this i have to make a txt file and write the script which u gave.... then i have to save in which file ????... ThnQ..... zameer |
Quote:
|
THANX WAPCAPLET....
|
you know, cron was one of the things I struggled with a couple of years ago. Gave up. This looks way easier.
THANKS WAPCAPLET! titanium_geek |
All times are GMT -5. The time now is 11:21 AM. |