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@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue