6.46 Gzip-1.3.5

Mike Clawson mclawson at malik.princeton.edu
Fri Oct 28 07:27:11 PDT 2005


> Hi
> book version: lfs 6.1
> after instaling the gzip we use some commands like :
> ln -s gzip /bin/gunzip
> ok , this command will make a symlink (/bin/gunzipz) to gzip command .
> but /bin/gunzip is just a link and i think it means :
> when i use gunzip command , the link starts gzip command .
> now my question is :
>  so if i use a gzip command to decompress some file it should work and
> should decompress it .
> (gzip sample.tar.gz) should work like gunzip , because gunzip is just
> a symlink to gzip ;but it's not possible and i get error :
> sample.tar.gz already has .gz suffix -- unchanged.
> 
> Are there some extra features in gzip or ln command ?

The gzip command behaves differently depending on how it is called;
I would guess it just looks at the arguments passed to main(*).  I
did a little experimenting, and it seems if it is invoked with any
name except 'gunzip' it compresses, and if it is invoked as 'gunzip'
then it decompresses.

Mike




More information about the lfs-support mailing list