Ubuntu – How to find a folder on the server with a certain name

command linedirectoryfind

I have a directory somewhere on my server wth the name "exampledocs". I tried to find it's location using:

ls -d */ | grep -E 'exampledocs'

and

find * -regextype posix-extended \-regex 'exampledocs' \-type d

and

grep "exampledocs" * --recursive

Nothing worked. How can I do this from the command line? I'm using Ubuntu Server 11.0.

Best Answer

find / -xdev 2>/dev/null -name "exampledocs" 

Note: This is from Debian, but it should work.