Created
October 6, 2015 07:43
-
-
Save hfs/deaba31b023ec3bf8a57 to your computer and use it in GitHub Desktop.
Sum of sizes of files in a directory structure without counting directory sizes
This file contains hidden or 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/sh | |
find -type f -printf '%s\n' | awk '{s+=$1} END {print s}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment