From owner-freebsd-questions Mon Dec 10 8:16:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from etek.chalmers.se (quarl0.etek.chalmers.se [129.16.32.20]) by hub.freebsd.org (Postfix) with ESMTP id E6CDE37B417 for ; Mon, 10 Dec 2001 08:16:53 -0800 (PST) Received: from downy.etek.chalmers.se (_7-268@downy.etek.chalmers.se [129.16.32.207]) by etek.chalmers.se (8.10.0/8.8.8) with ESMTP id fBAGGgM30102; Mon, 10 Dec 2001 17:16:42 +0100 (MET) Received: from localhost (b@localhost) by downy.etek.chalmers.se (8.10.0/8.10.0) with ESMTP id fBAGGfi02125; Mon, 10 Dec 2001 17:16:41 +0100 (MET) Date: Mon, 10 Dec 2001 17:16:41 +0100 (MET) From: Magnus B{ckstr|m To: Nils Holland Cc: freebsd-questions@freebsd.org Subject: Re: Understaning the files in /stand (a little long, sorry) In-Reply-To: <20011210165503.A290@tisys.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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