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.} else {

Incoming search terms: