[GH-ISSUE #182] Allow decimal sizes (1k = 1000 instead of 1024) #78

Closed
opened 2026-06-08 11:25:35 +03:00 by zhus · 4 comments
Owner

Originally created by @eugenesvk on GitHub (Sep 21, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/182

Currently all sizes are displayed with a binary prefix (1k=1024=2¹⁰)
Please add an option to use decimal prefixes (1k=1000=10³)
Thanks!

Originally created by @eugenesvk on GitHub (Sep 21, 2021). Original GitHub issue: https://github.com/bootandy/dust/issues/182 Currently all sizes are displayed with a **binary** prefix (1k=1024=2¹⁰) Please add an option to use **decimal** prefixes (1k=1000=10³) Thanks!
zhus closed this issue 2026-06-08 11:25:35 +03:00
Author
Owner

@bootandy commented on GitHub (Sep 24, 2021):

That doesn't strike me as that useful, what's your usecase?

However du does allow something similar with the -B blocksize, so I'm happy to leave this open if you want to work on it.

<!-- gh-comment-id:926168349 --> @bootandy commented on GitHub (Sep 24, 2021): That doesn't strike me as that useful, what's your usecase? However du does allow something similar with the -B blocksize, so I'm happy to leave this open if you want to work on it.
Author
Owner

@eugenesvk commented on GitHub (Sep 24, 2021):

the usecase is the same as yours — getting size information about your disk, it's just that I don't find the 1024 representation useful, and it also doesn't match my file manager's config

<!-- gh-comment-id:926301751 --> @eugenesvk commented on GitHub (Sep 24, 2021): the usecase is the same as yours — getting size information about your disk, it's just that I don't find the 1024 representation useful, and it also doesn't match my file manager's config
Author
Owner

@danie-dejager commented on GitHub (Oct 19, 2021):

@bootandy The current output could be improved to better distinguish between ISO and binary as you are currently printing binary values and not ISO. df has similar output (G) due to the historic limitation on screen real-estate.

→ df -h | grep /home
/dev/mapper/cl_grbl--af001l2-home   20G   13G  7.7G  62% /home
→ df -H | grep /home
/dev/mapper/cl_grbl--af001l2-home   22G   14G  8.3G  62% /home

Should (Could optionally) dust print Gi instead?

<!-- gh-comment-id:946683221 --> @danie-dejager commented on GitHub (Oct 19, 2021): @bootandy The current output could be improved to better distinguish between ISO and binary as you are currently printing binary values and not ISO. df has similar output (G) due to the historic limitation on screen real-estate. ``` → df -h | grep /home /dev/mapper/cl_grbl--af001l2-home 20G 13G 7.7G 62% /home ``` ``` → df -H | grep /home /dev/mapper/cl_grbl--af001l2-home 22G 14G 8.3G 62% /home ``` Should (Could optionally) dust print `Gi` instead?
Author
Owner

@bootandy commented on GitHub (Oct 20, 2021):

Ok, there seems to be some interest in this so I'll look adding a flag to output ISO values as well as binary.

df:
-H, --si print sizes in powers of 1000 (e.g., 1.1G)

<!-- gh-comment-id:947420818 --> @bootandy commented on GitHub (Oct 20, 2021): Ok, there seems to be some interest in this so I'll look adding a flag to output ISO values as well as binary. df: ` -H, --si print sizes in powers of 1000 (e.g., 1.1G) `
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#78