how to install 'locate'?

Discussion in 'HOWTO-Related Questions' started by dealspiggy, Apr 17, 2008.

  1. dealspiggy

    dealspiggy New Member

    I tried to use 'locate httpd.conf', but it returned nothing. I guess the command locate hasn't been installed on my centos 5.1. I wonder how to enable it? I tried yum install locate, but not worked.
     
  2. o.meyer

    o.meyer New Member Moderator

    Hi dealspiggy,

    first run

    Code:
    updatedb
    after that you can use "locate".

    Best regards,

    Olli
     
  3. dealspiggy

    dealspiggy New Member

    thanks. that works
     
  4. topdog

    topdog Active Member

    Consider using find instead as results from locate cannot be relied upon, they are as good as the last time you ran updatedb

    Code:
    find / -iname httpd.conf
     

Share This Page