how to show total files size in a folder by filtering extension without showing each file size
du -ch *zip | grep total
Just add a grep statement in the end.
If you are against grep
, you can use,
du -s *zip
-s, --summarize
display only a total for each argument
you can use du -ch *.zip | tail -1
. last line of du -ch
is total. If the files have total.zip
grep total will return that one as well.