/var/log/lastlog, du and ls Do Not Agree
Bob Chiodini
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
52 /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
18688 /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
24 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
ls agree.
Is there something special about /var/log/lastlog?
From FC2:
# file /var/log/lastlog
/var/log/lastlog: Sendmail frozen configuration
The FC2 UDF copy:
# file /mnt/cdrom/log/lastlog
/mnt/cdrom/log/lastlog: data
From RH9:
$ sudo file /var/log/lastlog
/var/log/lastlog: data
Bob...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040608/15fa4d07/attachment-0001.sig>
More information about the fedora-list
mailing list