Skip to content

Instantly share code, notes, and snippets.

@nevans
Created March 17, 2010 18:36
Show Gist options
  • Save nevans/335569 to your computer and use it in GitHub Desktop.
Save nevans/335569 to your computer and use it in GitHub Desktop.
count files and disk usage
echo -e 'count\t size\t name'
for dir in *; do
echo -e `find "$dir" -type f | wc -l` '\t' \
`du -sh "$dir" | awk '{ print $1 }'` '\t' \
"$dir"
done | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment