You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While experimenting with different distro images in Docker, I noticed that du and dua were a bit inconsistent (and later that du itself was inconsistent too with --apparent-size if the version of du was older).
I discovered that dua reported /usr/share/man as only 20KiB, but du was showing about 1MB. This location had many directories nested and most empty. Other locations were like this as well (I had been using zypper --installroot /rootfs install glibc for example to see how much space the package would weigh), contributing several MB in weight invisible to dua for this small glibc package (2.7MB of 10.7MB total). This is due to each directory using a minimum 4096 bytes as the smallest block-size, with a new enough version of du the --apparent-size option will treat these as 0 bytes.
dua has the -A / --apparent-size flag too, but without it directory size seems to still be treated as 0 bytes. Perhaps that is useful for some users vs using dua -A? 🤷♂️
The linked discussion comment above suggested to raise an issue about this behaviour since it's technically a bug.
It would probably be more correct if dua would also count empty directories as consumer of an inode, which typically clocks in at 4KiB.
It would be neat if dua interactive also supported toggling between --apparent-size btw, which as a bonus would make it available in the TUI help view?
The text was updated successfully, but these errors were encountered:
I think this issue should remain focussed on making the size-on-disk include directories as consumer of a single block.
Supporting the --apparent-size flag for interactive sessions (either interactively or using the flag) should be a separate issue, otherwise it might get lost here.
While experimenting with different distro images in Docker, I noticed that
du
anddua
were a bit inconsistent (and later thatdu
itself was inconsistent too with--apparent-size
if the version ofdu
was older).I discovered that
dua
reported/usr/share/man
as only 20KiB, butdu
was showing about 1MB. This location had many directories nested and most empty. Other locations were like this as well (I had been usingzypper --installroot /rootfs install glibc
for example to see how much space the package would weigh), contributing several MB in weight invisible todua
for this smallglibc
package (2.7MB of 10.7MB total). This is due to each directory using a minimum 4096 bytes as the smallest block-size, with a new enough version ofdu
the--apparent-size
option will treat these as 0 bytes.dua
has the-A
/--apparent-size
flag too, but without it directory size seems to still be treated as 0 bytes. Perhaps that is useful for some users vs usingdua -A
? 🤷♂️The linked discussion comment above suggested to raise an issue about this behaviour since it's technically a bug.
#121 (reply in thread)
It would be neat if
dua interactive
also supported toggling between--apparent-size
btw, which as a bonus would make it available in the TUI help view?The text was updated successfully, but these errors were encountered: