Re: du size question

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

 



On 5/8/25 12:08 AM, Samuel Sieb wrote:
On 5/7/25 11:37 PM, ToddAndMargo via users wrote:
On 5/7/25 9:43 PM, Samuel Sieb wrote:
On 5/7/25 8:55 PM, ToddAndMargo via users wrote:
So bytes or KB?  If I specify --bytes on the line, I
get the apparent file size.  I am after the sparse size.
Apparent size defaults to KB.

If you don't specify the units, there are various possibilities that it could be, so you should specify something.  If you want KiB, then use "- k".  I just use "-h".  Unless you do something to give apparent size, you will get the sparse size.



$ du --byte SparceFile
104857600    SparceFile

$ du --apparent-size SparceFile
102400    SparceFile  (1024 KB I presume)

$ du SparceFile
0    SparceFile  (This is correct.  I created it this way.)


See what I mean?  If I specify units, I get --apparent-size.

No, you're specifically using bytes which is defined to also enable apparent size as the man page says.

        -b, --bytes
               equivalent to '--apparent-size --block-size=1'

If you just want a size in bytes, then use "--block-size=1".



$ du --block-size=1 KVM-W10.raw KVM-W11.raw SparceFile
      48891629568	KVM-W10.raw
      51850604544	KVM-W11.raw
      0                 SparceFile


Thank you!
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux