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`