On 07-Nov-04 Ted Harding wrote:
Hi Folks,
On one (A) of my 3 running machines, I noticed that 'ls -ls' on /var/log shows:
A: 44 -r-------- 1 root root 19136220 Oct 30 10:52 lastlog
which is inconsistent: 44K according to $1, but 19136220 bytes (19MB) according to $6. The latter is enormous! However, it seems that it has some validity, since
# cat lastlog | wc -c 19136220
gives the same result, here obtained by byte-counting the output of 'cat'.
I've picked up a thread on the debian-user list which deals with this:
http://lists.debian.org/debian-user/2000/05/msg01593.html
(follow it through to the end with "Next in Thread"). The respondent to the queries and comments is Miquel van Smoorenburg, who is certainly an authority on filesystems!
At the end, MvS points to the following explanation of the mechanism which is operating here:
http://www.nic.com/~cheah/hole.html
Anyway, the upshot is that the 44K in $1 would be the size of the file as stored on the hard drive, while the 19136220 in $6 is the size of the output when this file is read (the kernel fills in megabytes of nulls which do not get stored on disk).
But I still wonder why it needs to be so big ...
Best wishes to all, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 [NB: New number!] Date: 07-Nov-04 Time: 12:53:14 ------------------------------ XFMail ------------------------------