compress, uncompress no sim link to gunzip?

James Wilkinson james at westexe.demon.co.uk
Fri Sep 17 22:39:58 UTC 2004


Mike McMullen wrote:
> I'm working on a clean install of FC2 and I just looked at my system. I have
> compress and uncompress man pages and executables. uncompress is symlinked
> to compress. gzip and gunzip are their own separate executables.

Actually, on my system they aren't (and I bet they aren't really on
yours, either).

[root at howells bin]# ls -i gzip gunzip
16045 gunzip  16045 gzip

Notice they've got the same inode number? It's the same file, appearing
twice in the filesystem tree. This is quite permissible in Unix (and
compatible OSes): they're hardlinked together.

As with compress and uncompress, they change exactly what they do
depending on the filename that was used to run them.

Another bit or random, fairly useless, Unix trivia.

James.

-- 
E-mail address: james | So what would happen if an Enterprise security team,
@westexe.demon.co.uk  | who always get killed soon after appearing, fought a
                      | squad of Imperial Stormtroopers, who can't hit the
                      | broad side of a planet?





More information about the fedora-list mailing list