Created
January 5, 2016 05:51
-
-
Save colinmcintosh/eb3bf3dba246414af2d3 to your computer and use it in GitHub Desktop.
Find average file size recursively on FreeBSD
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
find / -name '*' -type f -print0 | xargs -0 ls -l | awk '{ total += $5; count += 1}; END { print (total/count)/1024/1024 " GB" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment