Re: Can somebody explain this? du & ls showing different sizes

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

 



2009/2/15 Vijay Gill <vijay.s.gill@xxxxxxxxx>:
> 2009/2/15 Rick <ellis@xxxxxxxxxxx>:
>> In article <60fdb1ad0902151205v6ef67c07v128f0c88f5895240@xxxxxxxxxxxxxx>,
>> Vijay Gill  <fedora-list@xxxxxxxxxx> wrote:
>>
>>>Running du -h tells that the file occupies 512M but ls -l tells that
>>>the file is a lot smaller.
>>
>> Apples and oranges. You get the file *size* with ls and the disk usage
>> with du. They aren't the same thing.
>>
>> --
>> http://yosemitenews.info/
>>

I found another funny behavior. Notice the sizes of
/var/log/samba/log.winbindd-idmap before and after I run xfs_io -c
stats on it. Again just looking at stats must not change the space
allocated to the file.


[root@aria tmp]# du -sh /var/log/samba/*
0       /var/log/samba/asus.log
0       /var/log/samba/cores
12K     /var/log/samba/__ffff_10.1.0.151.log
52K     /var/log/samba/log.nmbd
4.0K    /var/log/samba/log.smbd
0       /var/log/samba/log.wb-ARIA
0       /var/log/samba/log.wb-BUILTIN
4.0K    /var/log/samba/log.winbindd
0       /var/log/samba/log.winbindd-dc-connect
512M    /var/log/samba/log.winbindd-idmap
56K     /var/log/samba/log.winbindd-idmap.old
512M    /var/log/samba/nmbd.log
4.0K    /var/log/samba/smbd.log
4.0K    /var/log/samba/winbindd.log

[root@aria tmp]# xfs_io -c stat /var/log/samba/log.winbindd-idmap
fd.path = "/var/log/samba/log.winbindd-idmap"
fd.flags = non-sync,non-direct,read-write
stat.ino = 3944597
stat.type = regular file
stat.size = 403
stat.blocks = 1048576
fsxattr.xflags = 0x0 [--------------]
fsxattr.projid = 0
fsxattr.extsize = 0
fsxattr.nextents = 2
fsxattr.naextents = 0
dioattr.mem = 0x200
dioattr.miniosz = 512
dioattr.maxiosz = 2147483136

[root@aria tmp]# du -sh /var/log/samba/*
0       /var/log/samba/asus.log
0       /var/log/samba/cores
12K     /var/log/samba/__ffff_10.1.0.151.log
52K     /var/log/samba/log.nmbd
4.0K    /var/log/samba/log.smbd
0       /var/log/samba/log.wb-ARIA
0       /var/log/samba/log.wb-BUILTIN
4.0K    /var/log/samba/log.winbindd
0       /var/log/samba/log.winbindd-dc-connect
4.0K    /var/log/samba/log.winbindd-idmap
56K     /var/log/samba/log.winbindd-idmap.old
512M    /var/log/samba/nmbd.log
4.0K    /var/log/samba/smbd.log
4.0K    /var/log/samba/winbindd.log
[root@aria tmp]#

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux