Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a directory structure like:

foo
 |__bar
     |__bin
     |   |__tmp
     |
     |__bez
         |__tmp

I need to find the tmp directory in bin/tmp, but not the one in bez/tmp. It seems to me that find only operates on the name of one directory or file at a time. Is there a command that will return me the path to the tmp directory in bin, but not the one in bez? It's a bonus if the command finds all bin/tmp folders, as there may be many in the directory tree.

Many thanks!

share|improve this question
2  
What is the OS? –  MB34 Jun 19 '13 at 14:45
add comment

1 Answer

up vote 1 down vote accepted
find ./foo/ -type d -path '*/bin/tmp'
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.