tags:

views:

190

answers:

2

How can I extract the size of the total uncompressed file data in a .tar.gz file?

A: 

If you want to do this from the command-line, you could try the -l option to gzip:

$ gzip -l compressed.tar.gz
     compressed        uncompressed  ratio uncompressed_name
            132               10240  99.1% compressed.tar
Matthew Mott
This gives me the size of the tar file including file meta data such as file names etc. I was looking for a way to only check the total size of the files. Anyway, the only way to do this seem to be to extract the tar-file and run a script on the extracted content.
Ztyx
A: 

You can estimate the size of the tar file without extraction, refer #7: http://www.thegeekstuff.com/2010/04/unix-tar-command-examples/