Summing the size of a list of files via cli
ls -ls *.png | awk '{ sum += $6 } END { printf "size: %.2f MB\n", sum/1048576 }'
# size: 6.01 MB
Written by Matt Weppler
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Command line
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#