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

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

 



>Running du -h tells that the file occupies 512M but ls -l tells that

> the file is a lot smaller. Also I am sure the the cluster size is not

>512M (or am I wrong there?).

In order to explain this behavior I did following test:

$ echo "hello" > hi.txt

$ ls -l hi.txt

-rw-r--r-- 1 user group 6 2009-02-15 18:37 download/hi.txt

(the size of the file is 6 bytes "hello" + '\n' )

$ du hi.txt

4.0K hi.txt

(the size of the block -cluster is a MicroSoft equivalent term- is 4.0K)

That explains almost all. (Some data may be in memory in disk cache and can be some asynchrony with the file system)

FN

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