find . -type d -print0 | while read -d '' -r dir; do
files=("$dir"/*)
printf "%5d file count for directory %s\n" "${#files[@]}" "$dir"
done
Credits: https://stackoverflow.com/questions/15216370/how-to-count-number-of-files-in-each-directory
No comments:
Post a Comment