ls -lh show file not displaying correct size

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Sat Jan 31 15:06:42 PST 2009


> 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 ?

no it's right. it's 256G sized but most space unallocated. du shows how 
many space is allocated.

in unix files can have "holes" == blocks that are not allocated to disk


More information about the freebsd-questions mailing list