When you use the Locate command to find a file, it appears:
Locate:can not open '/var/lib/mlocate/mlocate.db ': The specified database file was not found
Using #updatedb, you can solve the problem.
Locate instructions and find search file function similar, but locate is through the update program to the hard disk of all the files and directory data first set up an index database, in the execution of LOACTE directly find the index, query speed will be faster, index database is generally operated by the operating system, However, you can also directly release the update force system to immediately modify the index database. However, the first time you perform an update and then use locate to find a file often fails, you will need to perform slocate-u this command (or execute the UPDATEDB directive with the same effect) to update the Slocate database, which will be updated in the/usr/ Sbin generates slocate execution files, and then locate to the database to find the data.
Then the question comes up, and the result is:
# UpdateDB
UPDATEDB:SRC/UPDATEDB.C:595:SCAN_CWD: Assertion "Name_size > 1" failed.
Online Search This problem, only ask, did not answer, so have to solve their own.
Using UpdateDB's "-V" option, it was found that "a bizarre file in the/sys/module/nousb/parameters/directory caused UpdateDB to quit, and this bizarre file is shown in the list as follows:
ls/sys/module/nousb/parameters/-lah
Total 0
Drwxr-xr-x 2 root root 0 2008-04-24
Drwxr-xr-x 2 root root 0 2008-04-24.
Drwxr-xr-x 3 root root 0, 2008-04-24.
It was the first file and nothing was shown. There is no way to delete, restart detection file system also no errors, Halo.
Finally looked at the UpdateDB document, modified its configuration file, Modify updatedb.conf, put the directory containing this file into the prunepaths, do not let Updatedab scan the directory, and then rerun UpdateDB This command, successfully completed, to solve the problem.