Skip to content

du: different behavior compared with gnu du #8913

@marchaesen

Description

@marchaesen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions