Linux File/Folder Search from Terminal

Sometimes we need to find file or folder . It is easy in graphical file manager . But in terminal you have to be tricky .

For search a file from whole system :

find / -type f -name "index.php"

For searching a file from a folder where you are in now :

find ./ -type f -name "index.php"

For searching a file from a specific folder :

find /etc/init.d/ -type f -name "index.php"

For searching a folder from whole system :

find / -type d -name "apache2"

For searching a folder from a folder where you are in now :

find ./ -type d -name "apache2"

For finding a folder from specific folder :

find /var/www/ -type d -name "blog"

Thank You

Leave a Reply

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