uutils / uutils/coreutils

du: different behavior compared with gnu du

Open
#8,913 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - du
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

I am using the new coreutils on ubuntu 25.10.
When executing du without options, the output format is different:

❯ du /home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2
20K	/home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2/overlays
20M	/home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2

❯ gnudu /home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2
20	/home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2/overlays
19804	/home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2_

When the option -k is used, an error is printed. The gnu versions accepts this option:

❯ du -bks /home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2
error: the argument '-k' cannot be used multiple times

For more information, try '--help'.

❯ gnudu -bks /home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2
19796	/home/mahae/yocto/gatewayng/build/tmp/work/ucm_imx8m_mini-poky-linux/core-image-base/1.0/tmp-wic/boot.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported du and GNU du commands, including the default output and -bks combination. Compare the du command's behavior with GNU compatibility expectations; done means matching the shown GNU output format and accepting -bks without the duplicate-option error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.