[KLUG Members] gunzip uncompresses file to zero bytes

Adam Tauno Williams awilliam at whitemice.org
Thu Mar 9 07:46:09 EST 2006


> > >> > I ran 
> > >> > gunzip filename
> > >> > to a file.  It worked away for a while and when it was done, left me
> > >> > with a file of zero bytes.
> > >> > What happened?
> > >> It didn't display any warning messages?  
> > >No, just returned the command prompt.
> > Wierd,  run "strace gunzip ...." and look at the tail end of the output.
> O.k., running
> strace gunzip 

You have to "strace gunzip {filename}" -- strace runs the command and
reports the systems calls it makes,  this often reveals internal error
messages.

> gives me stuff that makes no sense to me, but here is the tail end...
> rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGINT, {0x804cd90, [INT], SA_RESTORER|SA_RESTART,
> 0x40047cf8}, {SIG_IGN}, 8) = 0
> rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGTERM, {0x804cd90, [TERM], SA_RESTORER|SA_RESTART,
> 0x40047cf8}, {SIG_IGN}, 8) = 0
> rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGHUP, {0x804cd90, [HUP], SA_RESTORER|SA_RESTART,
> 0x40047cf8}, {SIG_IGN}, 8) = 0
> ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
> write(2, "gunzip: compressed data not read"..., 81gunzip: compressed
> data not read from a terminal. Use -f to force decompression.
> ) = 81
> write(2, "For help, type: gunzip -h\n", 26For help, type: gunzip -h
> ) = 26
> exit_group(1)                           = ?

Well, "write(2, ..." is always messages sent to standard error.



More information about the Members mailing list