From owner-freebsd-questions@FreeBSD.ORG Sat Jan 31 21:33:19 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E84E10656D7 for ; Sat, 31 Jan 2009 21:33:19 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id C993E8FC0A for ; Sat, 31 Jan 2009 21:33:18 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan-a.emsphone.com [199.67.51.107]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id n0VLXHl6041426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 31 Jan 2009 15:33:17 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id n0VLXHdF034718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 31 Jan 2009 15:33:17 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id n0VLXFhh034714; Sat, 31 Jan 2009 15:33:15 -0600 (CST) (envelope-from dan) Date: Sat, 31 Jan 2009 15:33:15 -0600 From: Dan Nelson To: Wayne Message-ID: <20090131213315.GE75802@dan.emsphone.com> References: <540878.43866.qm@web33108.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <540878.43866.qm@web33108.mail.mud.yahoo.com> X-OS: FreeBSD 7.1-STABLE User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Sat, 31 Jan 2009 15:33:17 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-questions@freebsd.org Subject: Re: ls -lh show file not displaying correct size X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 21:33:19 -0000 In the last episode (Jan 31), Wayne said: > Hello, > > I have a db file of FreeBSD 7.1 amd64 that is displaying the wrong size. This is a db file used by my mail filter software to to Bayes Filtering. > If I do an ls -l or ls -lh I get > filter1# ls -l > total 489024 > -rw-------  1 defang  defang  274992627712 Jan 31 08:33 @@RPTN.db > filter1# ls -lh > total 489024 > -rw-------  1 defang  defang   256G Jan 31 08:33 @@RPTN.db > If I do a du I gecus18-179# du > 489026  . > cus18-179# du -h > 478M    . > My drive is only 250 Gig and I have it mounted as /var/spool here is my df for the whole file system. > /dev/ad14s1d    226G    810M    207G     0%    /var/spool > > So I know that the 256G is wrong. Can any one tell me what is up with file size ? The 256G is correct. It's a sparse file (i.e. there are holes in it). "ls -sk" will print the actual disk space occupied by a file. -- Dan Nelson dnelson@allantgroup.com