The locate command is a very useful command to find the exact path/location of files in Linux if you know the file name. You can install it using yum and the package is mlocate.
Quote
Quote
can not open `/var/lib/mlocate/mlocate.db’: No such file or directory
It is a common issue while using locate command, and the error is because we haven’t created the db for locate. To create db for locate, simply run the command :
# updatedb
Wait for it to complete and run the locate command again. It should be working fine this time…!!!
You can use the same command (updatedb)to update recent changes to locate’s db.
COMMENTS