linuxubuntuubuntu-14.04ubuntu-12.04

how to search for a directory from the terminal in ubuntu


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.


Solution

  • Yyou 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