1833846 Members
1999 Online
110063 Solutions
New Discussion

Re: gzip and gunzip

 
SOLVED
Go to solution
Todd McDaniel_1
Honored Contributor

gzip and gunzip

Okay, I downloaded 1.3.3 gzip and ./configure and make...

I have 1.3.3 gzip now, but how do I compile 1.3.3 gunzip? what am I missing?

for HPUX of course...
Unix, the other white meat.
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: gzip and gunzip

gzip and gunzip are the same executable! You simply need to link them and you are done. The code simply looks at argv[0] and asks itself is my name "gzip" or "gunzip" and acts accordingly. This is a standard UNIX idiom.
If it ain't broke, I can fix that.
Todd McDaniel_1
Honored Contributor

Re: gzip and gunzip

hehe... thanks...

I AM an idiom :D
Unix, the other white meat.
Michael Schulte zur Sur
Honored Contributor

Re: gzip and gunzip

Hi,

these two files are hard linked to be seen with ls -lisa *zip*
Use ln, not ln -s.
If exist knowledge(*)
then
update thispost set points=0
fi
;-)

greetings,

Michael
Todd McDaniel_1
Honored Contributor

Re: gzip and gunzip

Michael,

Actually, I just cp gzip gunzip; cp gzip gzcat...

And they work fine!!

# ls -lisa g*
40932 586 -rwx--x--x 1 root sys 299200 Mar 19 11:03 gunzip
45109 586 -rwx--x--x 1 root sys 299200 Mar 19 11:07 gzcat
40763 586 -rwx--x--x 1 root sys 299200 Mar 19 10:38 gzip
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: gzip and gunzip

I think I will redo them as ln so they are technically correct...
Unix, the other white meat.
A. Clay Stephenson
Acclaimed Contributor

Re: gzip and gunzip

Todd, notice that I said they are the same executable. That was intentional wording. They are only the same if the are linked (hard). That way if you copy or replace one, you implicitly replace the other.

Actually, your makefile should have created this link for you so you should really fix the "problem" there.
If it ain't broke, I can fix that.