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.
You can use the same command (updatedb)to update recent changes to locate’s db.
Quote
can not open `/var/lib/mlocate/mlocate.db’: No such file or directoryIt 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 :
Code: [Select]
# 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.
No comments:
Post a Comment