Calculate disk space occupied by many .png files
Posted
by
Alexander Farber
on Server Fault
See other posts from Server Fault
or by Alexander Farber
Published on 2012-07-10T13:30:58Z
Indexed on
2012/07/10
15:17 UTC
Read the original article
Hit count: 324
I have 357 .png files located in different sub dirs of the current dir:
settings# find . -name \*.png |wc -l
357
settings# find . -name \*.png | head
./assets/authenticationIcons/audio.png
./assets/authenticationIcons/bbid.png
./assets/authenticationIcons/camera.png
./bin/icons/ca_video_chat.png
./bin/icons/ca_voice_control.png
./bin/icons/ca_vpn.png
./bin/icons/ca_wifi.png
Is there a oneliner to calculate the total disk space occupied by them (before I pngcrush them)?
I've tried (unsuccessfully):
settings# find . -name \*.png | xargs du -s
4 ./assets/support/wifi_locked_icon_white.png
1 ./assets/support/wifi_vpn_icon_connected.png
1 ./assets/support/wi_fi.png
1 ./assets/support/wi_fi_conected.png
8 ./bin/blackberry-tablet-icon.png
2 ./bin/icons/ca_about.png
2 ./bin/icons/ca_accessibility.png
2 ./bin/icons/ca_accounts.png
2 ./bin/icons/ca_airplane_mode.png
2 ./bin/icons/ca_application_permissions.png
1 ./bin/icons/ca_balance.png
© Server Fault or respective owner