[Bug 2132245] Re: "du" is double-counting hard links when multiple arguments specified

Launchpad Bug Tracker 2132245 at bugs.launchpad.net
Wed Feb 11 00:17:14 UTC 2026


This bug was fixed in the package rust-coreutils - 0.6.0-0ubuntu1

---------------
rust-coreutils (0.6.0-0ubuntu1) resolute; urgency=medium

  * New usptream version (LP: #2139697)
  * Fixes:
    - comm does not work as expected with process substitution (LP: #2138315)
    - git: FTBFS in Resolute (LP: #2138217)
    - tee with multiple --append fails in rust corutils (LP: #2134578)
    - echo 1 | sort | head -n0: sort: write failed: 'standard output':
      Broken pipe (LP: #2133156)
    - env: Rust unwrap with UTF-8 symbols in environment variables
      (LP: #2132941)
    - "du" is double-counting hard links when multiple arguments specified
      (LP: #2132245)
    - dd: O_DIRECT partial block writes fail (LP: #2132150)
    - date does not support localized output (LP: #2130859)
    - SSH sessions blocked on unavailable automounts by default in Ubuntu 25.10
      (LP: #2130843)
    - rust-coreutils 'shred' refuses to write to a device (LP: #2130396)
    - rust-coreutils stats handling breaks wireguard's wg-quick (LP: #2127851)
    - rust-coreutils:dd: Broken pipe (LP: #2125943)
    - /usr/bin/sort: -k option does not behave as GNU's sort (LP: #2125504)
    - uutils wc crashed with SIGABRT on logout (LP: #2122166)
    - who, pinky are empty - need to talk to logind (LP: #2117771)
  * Drop applied patches:
    - use-mem-zeroed.diff: The timespec C-binding struct has been replaced
      by the safe abstraction nix::sys::time::TimeSpec. Padding should now
      be handled internally for 32-bit architectures.
  * Refresh patches:
    - Tweak-release-build-profile.patch
    - build-stty.patch
    - dd-ensure-full-writes.patch
    - fix-prefix.diff
    - glibc-2.42.patch
    - require-utilities-to-be-invoked-using-matching-path.patch
    - use-l10n-translations-in-makefile.patch
    - workspace-exclude.patch
  * Add patch:
    - prevent-stty-termios2-on-ppc64el.patch: The termios2 header is not
      always available or exposed on ppc64el systems. Use the standard termios
      interface instead to avoid build failures on such systems.
  * Skip failing tests:
    (s390x)
    - test_env::test_simulation_of_terminal_for_stdout_only
    - test_nohup::test_nohup_stderr_to_stdout
    - test_nohup::test_nohup_with_pseudo_terminal_emulation_on_stdin_stdout_stderr_get_replaced
    - test_touch::test_touch_changes_time_of_file_in_stdout
    (amd64v3)
    - test_dd::test_stdin_stdout_skip_w_multiplier
  * Re-enable previously failing tests:
    - test_chown::test_chown_only_group_id_nonexistent_group
    - test_chown::test_chown_only_user_id_nonexistent_user
    - test_expr::test_long_input
    - test_factor::test_parallel
    - test_install::test_install_and_strip
    - test_install::test_install_and_strip_with_program
    - test_ls::test_device_number
    - test_ls::test_localized_possible_values
    - test_od::test_od_options_after_filename
    - test_od::test_suppress_duplicates
    - test_sort::
      + test_argument_suggestion
      + test_clap_localization_help_message
      + test_clap_localization_invalid_value
      + test_clap_localization_unknown_argument
      + test_error_colors_disabled
      + test_error_colors_enabled
      + test_french_translations
      + test_help_colors_disabled
      + test_help_colors_enabled
    - test_stat::
      + test_mount_point_basic
      + test_mount_point_combined_with_other_specifiers
      + test_multi_files
      + test_normal_format
      + test_printf
      + test_symlinks
      + test_terse_fs_format
    - test_error_messages_french_translation
    - test_french_colored_error_messages
    - test_help_messages_french_translation
    - util_invalid_name_invalid_command

 -- Simon Johnsson <simon.johnsson at canonical.com>  Tue, 03 Feb 2026
17:53:04 +0100

** Changed in: rust-coreutils (Ubuntu)
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/2132245

Title:
  "du" is double-counting hard links when multiple arguments specified

Status in rust-coreutils:
  Fix Released
Status in rust-coreutils package in Ubuntu:
  Fix Released

Bug description:
  I have a script that uses "du" to show the disk space taken up by
  historical backups. The backups are in separate folders, and there are
  a lot of hard links shared between the folders (i.e. where there were
  no changes to the files between backups).

  Using the original version of "du", I could specify the (multiple)
  backup folders on the command line, and a given file's disk usage
  wouldn't be counted if it had been included in an an earlier folder.
  (The reason this was useful was to know how much space could be freed
  up by deleting the oldest backups.) For example:

  $ du -h /opt/backup/2025-10-26 /opt/backup/2025-10-22 /opt/backup/2025-10-19
  8.1G	/opt/backup/2025-10-26
  6.7G	/opt/backup/2025-10-22
  6.7G	/opt/backup/2025-10-19

  FYI Running 3 separate du commands highlights the shared disk usage
  (i.e. 8.2G for #2 & #3 instead of 6.7G above):

  $ du -h /opt/backup/2025-10-26
  8.1G	/opt/backup/2025-10-26
  $ du -h /opt/backup/2025-10-22
  8.2G	/opt/backup/2025-10-22
  $ du -h /opt/backup/2025-10-19
  8.2G	/opt/backup/2025-10-19

  However since upgrading to Ubuntu 25.10 this has stopped working. Now
  each argument passed to du seems to be processed independently, as
  shown by the following example (from a different server):

  $ du -h /opt/backup/2025-10-26 /opt/backup/2025-10-22 /opt/backup/2025-10-19
  42G	/opt/backup/2025-10-26
  42G	/opt/backup/2025-10-22
  42G	/opt/backup/2025-10-19

  Which is the same as you get when running 3 separate du commands:

  $ du -h /opt/backup/2025-10-26
  42G	/opt/backup/2025-10-26
  $ du -h /opt/backup/2025-10-22
  42G	/opt/backup/2025-10-22
  $ du -h /opt/backup/2025-10-19
  42G	/opt/backup/2025-10-19

  Can you please look at restoring the behaviour of the original "du"
  command when passing in multiple arguments?

  -----

  $ lsb_release -rd
  Description:	Ubuntu 25.10
  Release:	25.10

  $ apt-cache policy rust-coreutils
  rust-coreutils:
    Installed: (none)
    Candidate: 0.0.30-1
    Version table:
       0.0.30-1 500
          500 http://nz.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/rust-coreutils/+bug/2132245/+subscriptions




More information about the foundations-bugs mailing list