Most Linux systems include a periodic process to update the database. If
your system returned an error with the above command such as the following,
then you will need to run updatedb
to generate the search
database:
$ locate bin/ls
locate: /var/spool/locate/locatedb: No such file or directory
$ su
Password:
# updatedb
The updatedb
command may take a long time to run. If you have
a noisy hard disk, you will hear a lot of racket as the entire filesystem is
indexed. :)