Home > Uncategorized > Recursive file sizes (filtered by file type)

Recursive file sizes (filtered by file type)

I had to find out the size of all our images on a site today. This was the easiest and fastest way to do it

CODE:
  1. find /home/username/public_html -name '*.png' -printf "%s\n"|awk '{sum+=$0}END{print sum}'

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.