locate and updatedb gives command not found

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


36 points

I am on a fresh CentOS machine and whenever I use locate or updatedb to search for a file, it tells me "command not found".

What is the reason? How do I install locate or updatedb on the server?



20 points

Install slocate to run locate/updatedb on your CentOS or RedHat linux server as follows:

yum install slocate

Anonymous's picture
Created by Anonymous
24 points

Thanks it worked!

Anonymous's picture
Created by Anonymous

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.