Skip to content

Instantly share code, notes, and snippets.

@jaybo
Created December 28, 2014 18:21
Show Gist options
  • Save jaybo/51e2f34952466dae4dc6 to your computer and use it in GitHub Desktop.
Save jaybo/51e2f34952466dae4dc6 to your computer and use it in GitHub Desktop.
bash, count files in subdirectories
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