Skip to content

du: fix -l/--count-links option not counting hardlinks separately#9884

Merged
sylvestre merged 4 commits into
uutils:mainfrom
WaterWhisperer:du-count-links
Dec 30, 2025
Merged

du: fix -l/--count-links option not counting hardlinks separately#9884
sylvestre merged 4 commits into
uutils:mainfrom
WaterWhisperer:du-count-links

Conversation

@WaterWhisperer

@WaterWhisperer WaterWhisperer commented Dec 28, 2025

Copy link
Copy Markdown
Contributor

Fixes: #9871

Reproduce:

mkdir test && cd test
dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
ln file1 file1.1
dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
$ du .
84	.
$ du -l .
148
$ /bin/du .
84	.
$ /bin/du -l .
148

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/csplit/csplit-io-err was skipped on 'main' but is now failing.

@anastygnome

Copy link
Copy Markdown
Contributor

Hey, could you add test code ?

@WaterWhisperer

Copy link
Copy Markdown
Contributor Author

Hey, could you add test code ?

Sure

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/csplit/csplit-io-err was skipped on 'main' but is now failing.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre
sylvestre merged commit 28ac732 into uutils:main Dec 30, 2025
128 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

du: du -l doesn't count hardlinked files separately

3 participants