Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • That is pretty close to what I'm locking for. I updated my question in order to be more precise. This solution finds any file whose path contains a directory named foo. However, I'm interested only in files whose parent is named foo. Commented Sep 17, 2019 at 18:49
  • Ah, sorry I missed that. I'll work on an update. Commented Sep 17, 2019 at 19:34
  • I think @Jeff added that. Thanks for that! Commented Sep 17, 2019 at 19:57
  • 4
    Note: a/foo/c/foo/z should be found. Commented Sep 17, 2019 at 20:02
  • Just updated the answer to show that. Commented Sep 17, 2019 at 22:22