Last active
February 4, 2017 18:06
-
-
Save bicccio/ee7033553f3285915b4d34a9ec0ad765 to your computer and use it in GitHub Desktop.
count howthe number of files inside each subdirctory
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
#! /bin/bash | |
dir=$1 | |
find $dir -type d -maxdepth 1 -mindepth 1 -print0 | while IFS= read -r -d $'\0' line; do | |
echo "$line" | |
ls -R "$line" | wc -l | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment