Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jan 2009 15:33:15 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Wayne <testcat2003@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ls -lh show file not displaying correct size
Message-ID:  <20090131213315.GE75802@dan.emsphone.com>
In-Reply-To: <540878.43866.qm@web33108.mail.mud.yahoo.com>
References:  <540878.43866.qm@web33108.mail.mud.yahoo.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20090131213315.GE75802>