Created
August 23, 2018 07:16
-
-
Save diversit/9f62b0e67f178bce8ba9b163f4de839d to your computer and use it in GitHub Desktop.
count-files-per-folder.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loop over folders and count the files in the folder | |
find . -maxdepth 1 -mindepth 1 -type d | while read dir; do | |
printf "%-25.25s : " "$dir" | |
find "$dir" -type f | wc -l | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment