How to Find files in Linux

Files can be found under linux in many different ways. On this post, I will show you two simple way to find files in linux which are using locate and find command. Below are the samples that i hope can help you to understand on the basic syntax of these two command.

    [root@server ~]# locate httpd.conf

The locate command will produce a list of the locations where you could find files that are named as httpd.conf. It will return all the possibilities location which contains word “httpd.conf

    [root@server ~]# find / -name httpd.conf

The find command above searches within the directory / for files that have their names httpd.conf.

Leave a Reply

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

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=""> <s> <strike> <strong>