From owner-freebsd-questions Mon Oct 29 11:52:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id 775AE37B401 for ; Mon, 29 Oct 2001 11:52:51 -0800 (PST) Received: (qmail 1954 invoked by uid 100); 29 Oct 2001 14:53:22 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15325.28002.252462.816652@guru.mired.org> Date: Mon, 29 Oct 2001 08:53:22 -0600 To: Erik Rothwell Cc: questions@freebsd.org Subject: Re: Discrepancies between 'df' and 'du'... In-Reply-To: <48585188@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ 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 Erik Rothwell types: > Hi folks, > > I just noticed something really odd... if I run "df /var" I get this > output: > > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/ad0s1e 99183 89342 1907 98% /var] > > However, if I do something like "du -skh /var" the result is: > > 17M /var > > That's a rather significant difference. As far as I can tell, the contents > of /var (not including symlinks to data on other filesystems) does not > include more than 17MB worth of data... is there any obvious reason why df > might report otherwise? Du reports what it finds in the file system. Df reports what the file systems says is there. If there are files in the file system that du can't find, du won't report them but du will. The normal source of such files is a log file that you've deleted but a daemon still has open. Du won't be able to find it because there are no links to it in the file system, but it'll stay in the file system until the daemon closes the file. http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message