Finding a directory in a Linux Terminal

How can I find a particular directory in a terminal window in Linux? I think it involves using grep, but I'm not sure how.

3

3 Answers

Would you be looking for something like this?

find . -type d | grep DIRNAME
4

If you want to find a particular directory that might be anywhere on your computer, the following will work, but it might take a while.

find / -name DIRNAME -type d
1

If you have it installed, locate is designed for this. Google "man locate"

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like