Skip to content

Instantly share code, notes, and snippets.

@hfs
Created October 6, 2015 07:43
Show Gist options
  • Save hfs/deaba31b023ec3bf8a57 to your computer and use it in GitHub Desktop.
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
#!/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