Skip to main content
1 of 2
Jim L.
  • 8.8k
  • 1
  • 15
  • 29

One method is to find all files, then use grep to match only the desired results:

find . -type f | grep '/foo/[^/]*$'
Jim L.
  • 8.8k
  • 1
  • 15
  • 29