how to search for a directory from the terminal in ubuntu
95,623
Solution 1
you can search for directory by using find
with flag -name
you should use
find /user -name "sdk" -type d
meaning find directories named sdk in or below the directory /user
or if you want to be case-insensitive
find /user -iname "sdk" -type d
Solution 2
Please try the below command.
locate foldername | grep /foldername$
Author by
LetsamrIt
Updated on October 28, 2021Comments
-
LetsamrIt over 2 years
I am using Ubuntu and I want to search for a specific Directory called "sdk".
All that I know is, that "sdk" Directory is located somewhere under /user Directory
how can I search for "sdk" Directory from the terminal?
I tried the following
find / -name example docs -type d
but it says no such file or Directory.