/var/log/lastlog, du and ls Do Not Agree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux