Bug 9711 - Fails: cd /usr/bin; gzip file ; mv file.gz file ; file -z file
Summary: Fails: cd /usr/bin; gzip file ; mv file.gz file ; file -z file
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.8-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-01-26 23:30 UTC by jhs
Modified: 2002-06-02 12:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhs freebsd_committer freebsd_triage 1999-01-26 23:30:01 UTC
	Fails: cd /usr/bin; gzip file ;  mv file.gz file ; file -z file
	file: read failed: Undefined error: 0

Fix: 

Don't know !

I've compressed all the bins on my laptop system to save space, (inc X )
then noticed this oddity.  of course, my kernel does have gzip support :-)
How-To-Repeat: 
	see above
Comment 1 Jin Guojun 1999-01-27 00:03:36 UTC
>         Fails: cd /usr/bin; gzip file ;  mv file.gz file ; file -z file
>         file: read failed: Undefined error: 0

It looks ok to me. Have you ungzip the file.gz to see if it corruptted?

	-Jin

# uname
FreeBSD 2.2.8-RELEASE #0: Mon Dec 21 12:22:42 PST 1998
209 /usr/bin: cp file /tmp
210 /usr/bin: cd /tmp
211 /tmp: gzip file
212 /tmp: mv file.gz file
213 /tmp: ./file file
file: gzip compressed data, deflated, original filename, last modified: Tue Jan 26 16:00:01 1999, os: Unix
Comment 2 adrian 2000-02-25 23:37:16 UTC
After some investigation, this fails because for files larger than
HOWMANY bytes. This happens because it can't pass gzip a full file,
and gzip gives a 'unexpected EOF', kills the pipe, and this gives
the unexpected read error.

The solution for this is a more clever way of unzipping the first
part of a file - perhaps gzip's behaviour changed in the past?

Jointly hacked on by: Dan Papasian <bugg@bugg.strangled.net>
                      Adrian Chadd <adrian@freebsd.org>
Comment 3 iedowse freebsd_committer freebsd_triage 2002-01-19 22:54:25 UTC
State Changed
From-To: open->feedback


Does this problem still occur?
Comment 4 iedowse freebsd_committer freebsd_triage 2002-06-02 12:45:32 UTC
State Changed
From-To: feedback->closed


Feedback timeout.