11

ncdu screenshot

I've never seen ncdu do this. What's the matter with the red S and extra size columns?

This is a Windows root (NTFS, mounted with ntfs-3g), so I assume it has something to do with NTFS. But the sizes in the extra column make no sense at all, nor can I find any documentation of what it means.

Interestingly only directories have the second size column, but not all of them have it. And I find no pattern between those that do and those that don't.


Places I've researched:

  • man ncdu
  • Google
0

2 Answers 2

15

This is explained in the shared links section of the Ncdu 2 introductory post. It is a way of handling directory size discrepancies caused by hard links sharing content outside the directory: when “S” is displayed, the second column displays the amount of shared data in the directory, and when “U” is displayed, the second column displays the amount of unique data in the directory.

The size shown with “S” is disk space that won’t be freed if the directory is deleted, because it is also “held” by files outside the directory.

8

man ncdu, --shared-column

--shared-column OPTION

Set to off to disable the shared size column for directories, shared (default) to display shared directory sizes as a separate column or unique to display unique directory sizes as a separate column.

These options can also be cycled through in the browser with the 'u' key.

And for the 'u' key, it says:

Toggle display of the shared / unique size column for directories that share hard links. This column is only visible if the current listing contains directories with shared hard links.

It only seems to apply to directories with children where this is relevant. Otherwise the column stays hidden, even though it's enabled by default.

More background info: https://code.blicky.net/yorhel/ncdu/issues/36

1
  • 1
    Ah okay thank you. I guess I wasn't reading the manual page thoroughly enough.
    – cyqsimon
    Mar 3, 2023 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .