If you run into this error when using the locate
root@server6:~# locate index.html
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
Here's the easy fix:
Just run updatedb
and it will repair the problem.
What is updatedb? Updatedb updates file name databases used by GNU locate.
What is locate? Locate searches through a prebuilt database of files, and is significantly faster than find. However, it requires the database to be updated regularly.
My specific problem did not start until I stopped using root SSH logins, opting to instead "su -
" to the root user after logging in from an alternate account. (This is done for safety, of course. Disallowing root SSH access prevents brute force hacking attempts on common defaults usernames -- i.e., "root".) This happened on an Ubuntu 10.10 server running ISPConfig 3.
Easy fix, simple issue.
Need a good VPS host?
See our non-spammy List of top quality VPS web hosting providers
Servers always have problems. Having a good hosts helps prevent/avoid them!