Quoting Dinesh Joshi <[EMAIL PROTECTED]>:

> On Friday 30 December 2005 15:57, Satya wrote:
> >
> > du operates on blocks. du -b gives the right size in bytes.
> >
> 
> That explains it... But why is there such a large difference between 
> size reported in blocks and that reported by bytes?
> 
>  
The size of the file /var/log/lastlog can appear to be overly large on some
systems, most especially in 64 bit architectures.

This file is what we call a sparse file. A sparse file is a file that contains
unallocated blocks or "empty space", as it implies, it does not actually take
up filesystem space. To test this theory, execute the following command:

du -H /var/log/lastlog
6.0MB    /var/log/lastlog

Here the file is reported to be only ~6MB. This is the actual disk space the
file is taking up. The lastlog file only records data for users that have
logged in.

An important point to note when operating with sparse files is that certain
tools do have built-in functionality to deal with these types of files. For
example cp, tar and rsync. See the man page for each of those commands for
further information. 

Regards,

Komal


----------------------------------------------------------------
This message was sent using NWebmail, BSNL's Webmail Program


-- 
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to