in reply to Re: Re: tracking progress of gzip'd file
in thread tracking progress of gzip'd file

I've managed to get it running gzip -l:

$gziplist=`gzip -l $file`; $gziplist=~/.\n\s*\d*\s*(\d*)/; $filesize=$1;

Replies are listed 'Best First'.
Re: Re: Re: Re: tracking progress of gzip'd file
by js1 (Monk) on Feb 10, 2004 at 12:04 UTC

    Actually, that doesn't quite work because the uncompressed value is shortened:

    $ ls -l SG_BSGL01_main_460110220000.log -rw-r--r-- 1 52359 staff 394629763 Feb 10 11:54 SG_BSGL01_main +_460110220000.log $ ls -l SG_BSGL01_main_460110220000.log.gz -rwxrwxrwx 1 52359 staff 75011313 Jan 13 15:43 SG_BSGL01_main_ +460110220000.log.gz $ gzip -l SG_BSGL01_main_460110220000.log.gz compressed uncompr. ratio uncompressed_name 75011313 3486 -57182.0% SG_BSGL01_main_460110220000.log

    How do you know what units the size is in?

    js1.