locate

How to Install locate in Linux

Locate is very useful command to find the location of file/folder in linux.
Install mlocate package

# yum install mlocate

Update database by executing updatedb command

# updatedb

Now, locate any file/folder using “locate” command

# locate httpd

/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.modules.d
/etc/httpd/logs
/etc/httpd/modules
/etc/httpd/run
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/httpd/conf.d/README
/usr/sbin/httpd
/usr/share/httpd
/usr/share/doc/httpd-2.4.6
/usr/share/doc/httpd-tools-2.4.6
/var/cache/httpd
/var/cache/httpd/proxy
/var/log/httpd
/var/log/httpd/access_log
/var/log/httpd/error_log
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

fourteen + 14 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>