Get extracted size from tgz before extracting
Is it possible to get the size that a tgz will take up once it's extracted, but without extracting it? I basically want
tar tzf file.tgzwith sizes beside them. I'm really looking for a total, so a solution that gives total size but not specific file sizes would work.
If it compressed using gzip compression, you can do something like:
gunzip -l filename.tar.gz
Since a tar is not compressed, that should give you the information you need.
Hm I would prefer something like:
tar vtzf somefile.tar.gz |awk '{SUM += $3} END {print SUM}'