From owner-freebsd-fs@FreeBSD.ORG Tue Oct 16 21:25:29 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2583B16A473 for ; Tue, 16 Oct 2007 21:25:29 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id A9AA513C478 for ; Tue, 16 Oct 2007 21:25:28 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B6CC545F3F; Tue, 16 Oct 2007 23:25:26 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C365945E8F; Tue, 16 Oct 2007 23:25:20 +0200 (CEST) Date: Tue, 16 Oct 2007 23:25:02 +0200 From: Pawel Jakub Dawidek To: Bill Vermillion Message-ID: <20071016212502.GJ16627@garage.freebsd.pl> References: <20071016114035.O64828@lorax.ldc.upenn.edu> <20071016162948.GA79131@wjv.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="++alDQ2ROsODg1x+" Content-Disposition: inline In-Reply-To: <20071016162948.GA79131@wjv.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org, Paul Kupfer Subject: Re: du and df discrepancy X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 21:25:29 -0000 --++alDQ2ROsODg1x+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 16, 2007 at 12:29:48PM -0400, Bill Vermillion wrote: > du - shows the amount of blocks used by the system > df - shows the amunt of space it thinks is being used. >=20 > The latter will compute the length of sparse files so df > will show less free space than du. Sparse file will have=20 > blocks of no data in them. These are typically created > by database programs. Please, verify before giving an answer. Neither du(1) nor df(1) include sparse blocks in their calculations: # ls -lh /mnt/tmp/foo -rw-r----- 1 root wheel 10G 16 pa# 23:19 /mnt/tmp/foo # df -h /mnt/tmp/foo Filesystem Size Used Avail Capacity Mounted on /dev/md0 9.4M 52K 8.6M 1% /mnt/tmp --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --++alDQ2ROsODg1x+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHFSwuForvXbEpPzQRAtAEAJ9GY8F+gTUadyRUMlw51TP9ukVSvACfVI/w CoexGKv6VrgRhb6mPuyi64w= =k+VL -----END PGP SIGNATURE----- --++alDQ2ROsODg1x+--