0

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!

1
  • 2
    What is the OS?
    – MB34
    Commented Jun 19, 2013 at 14:45

1 Answer 1

1
find ./foo/ -type d -path '*/bin/tmp'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .