Created
August 30, 2018 03:30
-
-
Save aic25/5556d9d6d9513440573168f140ee236e to your computer and use it in GitHub Desktop.
file counter
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 | |
find . -type d -print0 | while read -d '' -r dir; do | |
files=("$dir"/*) | |
printf "%5d files in directory %s\n" "${#files[@]}" "$dir" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment