Created
October 9, 2013 11:39
-
-
Save unfo/6899899 to your computer and use it in GitHub Desktop.
Simple summation of file sizes
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 | |
# Example: find /path/ -type f -mtime +5 | xargs ls -l | sumls | |
awk '{ sum += $5 } END { print "total: " (sum / 1024 / 1024) " MB" } ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment