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
2010-04-30 12:15:31
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
2010-05-01 11:46:09
A:
You can estimate the size of the tar file without extraction, refer #7: http://www.thegeekstuff.com/2010/04/unix-tar-command-examples/