Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory structure like:

     |   |__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
What is the OS? – MB34 Jun 19 '13 at 14:45
up vote 1 down vote accepted
find ./foo/ -type d -path '*/bin/tmp'
share|improve this answer

You must log in to answer this question.

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