From owner-freebsd-hackers Fri May 31 02:34:46 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA02207 for hackers-outgoing; Fri, 31 May 1996 02:34:46 -0700 (PDT) Received: from itesec.hsc.fr (root@itesec.hsc.fr [192.70.106.33]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA02199; Fri, 31 May 1996 02:34:40 -0700 (PDT) Received: from tetard.hsc.fr (tetard.hsc.fr [192.70.106.43]) by itesec.hsc.fr (8.7.5/8.7.3/itesec-1.8) with ESMTP id LAA25929; Fri, 31 May 1996 11:34:29 +0200 (MET DST) Received: (from regnauld@localhost) by tetard.hsc.fr (8.7.5/8.7.3/tetard-uucp-2.8) id LAA01665; Fri, 31 May 1996 11:33:58 +0200 (MET DST) From: Philippe Regnauld Message-Id: <199605310933.LAA01665@tetard.hsc.fr> Subject: Re: df && du To: mpp@freefall.freebsd.org (Mike Pritchard) Date: Fri, 31 May 1996 11:33:58 +0200 (MET DST) Cc: hackers@freebsd.org (hackers) In-Reply-To: <199605310138.SAA27368@freefall.freebsd.org> from Mike Pritchard at "May 30, 96 06:38:02 pm" X-Mailer: ELM [version 2.4ME+ PL15 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Mike Pritchard écrit / writes: > > /dev/wd0s1e 30206 24720 3068 89% /var > > > > altair# cd /var > > altair# du -s . > > 12776 . > > altair# > > > > 12776 (du result) not even close to 24720 (df output) > > 12776 * 2 = 25552, which is pretty close. Did you run df with the > BLOCKSIZE environment variable set to "K", and du from > one without it being set? > > Try "du -sk" and see if you get something that is close to df's output. Anyway, I think du is broken in most of its implementation; it seems to have serious problems with links and such. A friend of mine's written a realdu utility some time ago, on SunOS 4.1.2 -- it also works on 2.1.0. I think it also supports the standard options (for scripts who rely on it). But it's a bit slower in 'real' mode. Anyone interested? -- Phil -- +-------------------+---------------------------------------+-----------------+ | Philippe Regnauld |_______Herve Schauer Consultants_______| regnauld@hsc.fr | +-------------------+FreeBSD - Turning PCs into Workstations+-----------------+