2

Is there any way to check the normal size of the compressed datasets (.gz) without decompressing it?

For example, I have 50 large .gz files (in total 50 Gb) that can't be decompressed due to storage issue but I want to report how much normal data is in there.

1

Use the -l option. From the manpage:

   -l --list
         For each compressed file, list the following fields:

             compressed size: size of the compressed file
             uncompressed size: size of the uncompressed file
             ratio: compression ratio (0.0% if unknown)
             uncompressed_name: name of the uncompressed file

Even if that option wouldn't be available, you still wouldn't need any storage space to uncompress the files and measure their size:

gzip -cd file.gz | wc -c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.