Wednesday, January 27, 2010

-bash: locate: command not found

Error Message:

[root@server ~]# locate filename
-bash: locate: command not found

You may receive the above error message while searching a file using locate command and the error indicates that the package “slocate” required for the locate command is not installed. To install the package, execute:

yum -y install slocate

You will now be able to use the locate command but before that, execute the command “updatedb” so that the locate database is updated.

No comments:

Post a Comment