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.
[[email protected] ~]# locate httpd.conf /etc/httpd/conf/.httpd.conf.swp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.rpmsave /etc/httpd/conf/httpd.conf_backup_ori
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”
[[email protected] ~]# find / -name httpd.conf /etc/httpd/conf/httpd.conf
The find command above searches within the directory / for files that have their names httpd.conf.