How to find a folder on my server with a certain name?
297,727
Solution 1
find / -xdev 2>/dev/null -name "exampledocs"
Note: This is from Debian, but it should work.
Solution 2
This also should work
find folder_full_path -name exampledocs -type d
Solution 3
locate exampledocs | grep /exampledocs$
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
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.
-
heroin almost 6 years@AmitabhaBiswas you need to set path instead of "/" in the command to search in specific folder.
-
Trect about 4 yearsThis works better