nushell: `du` does not return the actual disk usage

Describe the bug

du does not return the actual disk usage, while dust returns the actual disk usage.

How to reproduce

  1. Run du
  2. Compare the disk usage of each directories in output with other tools, like dust or exploere.exe

Expected behavior

The result of dust in the screenshot below, or the result of the du in bash.

Screenshots

QQ截图20231113092555

Configuration

key value
version 0.86.0
branch
commit_hash 8674ba30b193f544470362dfabf71cbdeb12694c
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.71.1 (eb26296b5 2023-08-03)
rust_channel 1.71.1-x86_64-pc-windows-msvc
cargo_version cargo 1.71.1 (7f1d04c00 2023-07-29)
build_time 2023-10-18 13:17:53 +00:00
build_rust_channel release
allocator mimalloc
features dataframe, default, extra, sqlite, trash, which, zip
installed_plugins

Additional context

No response

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

oh, i was in fact planning on reading the uutils du source code to check out how they implement this feature. i’ll see if the second strategy is feasible without major issues

we may want to switch to using the uutils/coreutils du command but output structured data. so, there are two approaches now:

  1. change what we have, which is fine but may be replaced later with uu_du
  2. add uu_du if the output can be made structured