/var/log/lastlog, du and ls Do Not Agree
chiodr at kscems.ksc.nasa.gov
Tue Jun 8 11:43:42 UTC 2004
I was testing UDF on CDRW yesterday and noticed that du and ls do not
agree on the size of /var/log/lastlog. This is an ext3 file system.
# du -s /var/log/lastlog
# ls -l /var/log/lastlog
-r-------- 1 root root 19136220 Jun 8 06:32 /var/log/lastlog
During the UDF testing, I copied /var/log to a UDF mounted partition (on
a CDRW). The results of du and ls seem to agree for the copy.
# du -s /mnt/cdrom/log/lastlog
# ls -l /mnt/cdrom/log/lastlog
-r-------- 1 root root 19136220 Jun 7 13:15 /mnt/cdrom/log/lastlog
Next, I tried cp -a /var/log /tmp (also ext3). du and ls disagree as
above. I also copied /var/log/lastlog to an NFS mounted filesystem. du
and ls still disagree, but du indicates that the file is even smaller.
# du -s lastlog
# ls -l lastlog
-r-------- 1 root root 19136220 Jun 8 06:32 lastlog
Thinking this was possibly a problem with large files, I tried du and ls
with some large (> 35MB) .wav files. The results were correct, du and
Is there something special about /var/log/lastlog?
# file /var/log/lastlog
/var/log/lastlog: Sendmail frozen configuration
The FC2 UDF copy:
# file /mnt/cdrom/log/lastlog
$ sudo file /var/log/lastlog
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the fedora-list