tags:

views:

33

answers:

3

hi all I used the following find command to search files

   find /tmp -regex ".*some_file" 

How I can to search on the same way directories?

Yael

+2  A: 

Add the -type d test:

find /tmp -type d -regex ".*some_dir"
Nick Meyer
+2  A: 
find /tmp -regex ".*some_dir" -type d
wilhelmtell
+1  A: 

If I understood your question correctly:

find /tmp -regex "some_dir" -type d
Lajnold