Skip to main content
removed stray answer to focus on the intended answer
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

Would a simple find foo -type f not work?

EDIT: Wait, from your example you are looking for files in any directory named foo. The first thing that comes to mind is:

find $ROOT_PATH -type d -name foo | xargs -n1 -I{} find {} -type f

Would a simple find foo -type f not work?

EDIT: Wait, from your example you are looking for files in any directory named foo. The first thing that comes to mind is:

find $ROOT_PATH -type d -name foo | xargs -n1 -I{} find {} -type f

The first thing that comes to mind is:

find $ROOT_PATH -type d -name foo | xargs -n1 -I{} find {} -type f

Source Link

Would a simple find foo -type f not work?

EDIT: Wait, from your example you are looking for files in any directory named foo. The first thing that comes to mind is:

find $ROOT_PATH -type d -name foo | xargs -n1 -I{} find {} -type f