-bash: locate: command not found
From WebHostingNeeds.com
Revision as of 18:45, 30 June 2009 by Admin (talk | contribs) (New page: <pre> [email protected] [~]# locate -bash: locate: command not found [email protected] [~]# </pre> To fix install mlocate <pre> yum install mlocate </pre> Now when i run <pre> [email protected] [~]# loc...)
[email protected] [~]# locate -bash: locate: command not found [email protected] [~]#
To fix install mlocate
yum install mlocate
Now when i run
[email protected] [~]# locate httpd.conf locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory [email protected] [~]#
This is because, locate only searches through a static index of files. You need to generate index by running
updatedb
To keep the database uptodate, you should add a cron to update this daily
0 0 * * * updatedb