Finding Directories With "Find" Command?
I'm having trouble trying to use the find command to find a directory. I purposely made a directory in:
Called "OMG" and it's really got me baffled how I can find it in the terminal window. I can easily use the "find" command to find files but for some reason it doesn't allow me to find directories. Anyway here is the command I am using:
find "OMG" -type -d -print
And, sadly, it doesn't find it. :(
What I would like it to acheive is to find the directory and list it's path. If someone can help me with this issue, it would make me a lot happier :)
Finding Directories With "Find" Command
Using / will start the search from the root, so you don't have to remember where it might be. Specifying -type d first may speed up your search. Not sure about sudo.
sudo find / -type d -name 'OMG'