Both are correct.  That file has one giant hole, it's mostly nulls and
hasn't been allocated many disk blocks.  'ls' reports the filesize as
reported in the header of the file.  'du' reports the number of disk
blocks allocated.  If you were to 'cp' that file, you'll find the new
file has a much larger disk usage.

On Mon, Mar 04, 2002 at 01:25:53AM +0100, Alexander Skwar alleged:
> Hi.
> 
> Watch the following:
> 
> > ls -lh core.29027
> -rw-------    1 askwar   askwar       6.2M M�r  4 00:45 core.29027
> 
> > du -h core.29027
> 396K    core.29027
> 
> Uhm, how can it be that ls reports that the file takes 6.2 MB and du
> only says 396K?  What is correct?
> 
> > file core.29027
> core.29027: ELF 32-bit LSB core file of 'nslookup' (signal 25), Intel 80386, version 
>1 (SYSV), from 'nslookup'
> 
> This is on a XFS filesystem.
> 
> Alexander Skwar
> -- 
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage:     http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
>    iso-top.de - Die g�nstige Art an Linux Distributionen zu kommen
>                        Uptime: 1 day 15 hours 34 minutes

Reply via email to