Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!news.duke.edu!news.mathworks.com!fu-berlin.de!zib-berlin.de!irz401!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Newbie question about the /stand directory Date: 23 Feb 1996 23:54:29 GMT Organization: Private BSD site, Dresden Lines: 34 Message-ID: <4glk3l$47c@uriah.heep.sax.de> References: <4gg14i$ggk@news1.cle.ab.com> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.3 bruce.halco@ab.com (Bruce Halco) writes: > Why does the /stand directory take up so much space? It's using > > 50MB on my system for a bunch of files with large and unusual > sizes (802816 and 456940 bytes), almost all of which exist elsewhere > in a smaller file. It's mostly kept there as a fallback option, in case you've screwed some of the other binaries in the system. For example, if you've accidentally trashed your /bin/sh, you can boot into single-user, and being asked for the name of a shell, enter /stand/sh at the prompt. However, it doesn't eat up that much space. You've incorrectly summed up the size of each binary -- but ignored the link counts of the files. Running `du' on the /stand directory of a fairly recent 2.2 SNAP yields slightly more than 1 MB. What you are seeing there is one large blurb of a binary, hard linked to many different names. This is used as a compression technique (you can consider it as 20 binaries with a dedicated ``shared library'' that contains just those functions out of the system library that are needed), called ``crunch''. RTFM crunchgen(1) for an explanation. The downside is, ``deleting'' some of these binaries is a no-op. It will end up in only an unlink of the directory entry, without freeing *any* space, since the file has still links. The file will only be deleted after the last link has been removed, so your options are to either keep /stand, or remove it completely. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)