How To Search For Files And Directories On A Linux File System

The “find” command can be used to locate files and folders that are stored on your file system. You do not need to be in a sub directory to locate the file. e.g. You can be in /var and the find command will be able to locate a file that is in /etc. For this example I will use find to locate the httpd directory.

find / -name httpd

This can be modified to find files by simply putting the file extension at the end of the file e.g. “find / -name httpd.conf”

This can be very useful when having to edit conf files for newly installed applications. If you are unfamiliar with the way the application is installed on the file system you can use find to do all the hard work.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.