gzip, gunzip, zcat
rwhron at earthlink.net
Wed Mar 14 04:37:46 PST 2001
On Wednesday 14 March 2001 05:07, Thomas 'Balu' Walter wrote:
> +-Randy Hron-(rwhron at earthlink.net)-[14.03.01 02:12]:
> > gzip, gunzip, and zcat are 3 names for the same executable.
> > It changes behavior depending on which command is used.
> > Anyway, the tip:
> > after moving gzip and gunzip to $LFS/bin:
> > ln -f $LFS/bin/gzip $LFS/bin/gunzip
> > ln -f $LFS/bin/gzip $LFS/bin/zcat
> > (zcat belongs in /bin with gzip and gunzip per the FHS 2.2 beta).
> > This example uses hard links rather than symbolic links.
> > Hard links are slightly faster and use the same space as a symlink,
> > (just a directory entry).
> > So the command snippet in chapter 5 could become:
> I don't think this is needed here, as Chapter 5 is just a Preparation
> for installing the real system.
> > In chapter 6 the commands could be:
> > ln -f gzip gunzip &&
> > ln -f gzip compress &&
> > ln -f gzip uncompress &&
> > ln -f gzip zcat
> I think those could be changed / added. And I also don't see a reason
> for using softlinks (never heard hardlinks are faster though).
> But if you delete e.g. gzip the hardlinks would make sure that compress
> and others would still work - which is not true using symlinks, correct?
You are right. A file isn't gone until the last link to it is removed.
The "slightly faster" is because a symlink has to be looked up,
then the "real file" has to be looked up. With a hard link, all
of the linked files are equal.
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the lfs-dev