locate and updatedb

When you need to search for some files, you might typically use find command. find is a good search utility but it is slow.

Locate is a fast way of finding files, as it searches a database reather than the file system.  The database file can be found in the following location:

/var/lib/mlocate/mlocate.db

One limitations of the locate command is if there is a dependency on the database and locate is unable to show your file.  The database can be updated by using the updatedb command.

When you run the updatedb command, it scans the whole filesystem and updates the mlocate.db.

sudo updatedb