[GH-ISSUE #94] Incorrect calculation in apparent size #39

Closed
opened 2026-06-08 11:25:25 +03:00 by zhus · 1 comment
Owner

Originally created by @travankor on GitHub (Jun 7, 2020).
Original GitHub issue: https://github.com/bootandy/dust/issues/94

dust -s seems to have contradicting output compared to du --apparent-size. Apparent size should usually be less than block size.

I ran dust -sn0 /gnu on the guix package store and have 21G, while du --apparent-size -sh /gnu returns 8.4G. I think dust counts hardlinks twice (since guix uses hardlinks to save space) although I'm not sure.

Originally created by @travankor on GitHub (Jun 7, 2020). Original GitHub issue: https://github.com/bootandy/dust/issues/94 `dust -s` seems to have contradicting output compared to `du --apparent-size`. Apparent size should usually be less than block size. I ran `dust -sn0 /gnu` on the guix package store and have 21G, while `du --apparent-size -sh /gnu` returns 8.4G. I think dust counts hardlinks twice (since guix uses hardlinks to save space) although I'm not sure.
zhus closed this issue 2026-06-08 11:25:25 +03:00
Author
Owner

@bootandy commented on GitHub (Aug 2, 2020):

dust -s counts hardlinks as taking up space on disk.

du --apparent-size does not count hardlinks as taking up space on disk

Intuitively I 'feel' like I did the right thing with dust and du does the wrong thing. But this is open to debate.

<!-- gh-comment-id:667687917 --> @bootandy commented on GitHub (Aug 2, 2020): `dust -s` counts hardlinks as taking up space on disk. `du --apparent-size` does not count hardlinks as taking up space on disk Intuitively I 'feel' like I did the right thing with dust and du does the wrong thing. But this is open to debate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#39