On Tue, Apr 19, 2016 at 8:43 AM, Eric Blake <ebl...@redhat.com> wrote: > merge 23314 23315 > > On 04/19/2016 09:11 AM, Giorgio Ciucci wrote: >> For each compressed file, eg. foo.gz, the command >> >> a=$(gzip -lq foo.gz) >> >> produces on stderr the message >> >> "gzip: write error: Bad file descriptor" > > You're the second one to report this today. The culprit is -l, and I > already bisected the commit at fault.
Thank you both. Note however that you really should not rely on gzip's -l option, due to the format-imposed limit an input of size 4TiB or larger, the size reported by --list (-l) will be reduced modulo 2^32, i.e., "wrong". https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=149775#10 If at all possible, I suggest that you switch to a superior format/tool like lzma/xz. Not only do options like --list work as expected with .xz files, but you'll find the actual compression ratios are far higher.