Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2001 17:16:41 +0100 (MET)
From:      Magnus B{ckstr|m <b@etek.chalmers.se>
To:        Nils Holland <nils@tisys.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Understaning the files in /stand (a little long, sorry)
Message-ID:  <Pine.OSF.4.21.0112101659010.29367-100000@downy.etek.chalmers.se>
In-Reply-To: <20011210165503.A290@tisys.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Dec 2001, Nils Holland wrote:
> however, one any of the two machines, the files seem to have the same size.

The binaries in /stand are not actually individual files, but rather hard
links to the same file (as you guessed from the link count).
That is also why the size is the same on each of them.
This single file is a `crunched' binary which incorporates the functionality
of each of the commands that it represents.  It decides which one to be
when you invoke it, from the name it gets invoked under (the argv[0] argument
to main()).

> I'd appreciate it if someone could give me a few hints on what I have told
> above. Prticularely, I'm interested in the following:
> 
> (1) What's up with this (hard link) number in front of the owner name? How
> comes that it is 1 on one of my machines and 31 on teh others. I replcaed
> a hard disk in the "1" machine recently and thus copied everything over to
> a new disk, probably this has to do with the difference. However, is this
> something to worry about?

Yes, if you copied the files individually (with cp -r) each hard link got
read and copied into an individual file.  tar(1) and dump/restore(8)
understand hardlinks, and are thus better tools for copying entire
filesystems.

> Any hints are welcome - thanks in advance!

If you want to know the details of crunched binaries, check
the man page for `crunchgen', and have a look at the stuff in
/usr/src/release.

Magnus


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.21.0112101659010.29367-100000>