I have not tried this with a file of the size you specified, but often find an uncompressed .gz file size with
zcat file.gz | wc -c
when I do not want to leave an uncompressed file around or bother him again.
Obviously, the data is uncompressed, but then transmitted over wc channels.
In any case, itโs worth a try.
EDIT: When I tried to create a 5G file with data from / dev / random, it created a 5G file of size 5120000000, although my file manager reported it as 4.8G
Then I compressed it using gzip 5G , the results of 5G.gz were the same size (not much random data compression).
Then zcat 5G.gz | wc -c zcat 5G.gz | wc -c reported the same size as the source file: 5120000000 bytes. In any case, my suggestion seemed to work for this test.
thanks for waiting
pavium
source share