Commit Graph
126 Commits
Author SHA1 Message Date
Eyüp Can AkmanandGitHub 5807760aa2 du: honor LC_NUMERIC for decimal separator (#12357)
* du: honor LC_NUMERIC for decimal separator

Route the fractional digit in `uucore::format::human::format_prefixed`
through `locale_decimal_separator()`, the same helper #11941 added for
`numfmt`. Fixes #11956.

* du: spell-check: ignore `replacen`

Matches the directive in `src/uu/numfmt/src/format.rs` for the same
helper introduced by #11941.
2026-05-20 10:38:12 +02:00
Lorenzo RossiandGitHub a8ca919dc4 du: propagate errors from --exclude-from instead of panicking (#11996)
* du: propagate errors from --exclude-from instead of panicking

* du: update test_du with --exclude-from failures

* du: fix expected stderr in exclude-from read-error test
2026-04-27 16:14:26 +02:00
6133ef5176 du: Allow command-line argument that appears more than once (#11897)
---------

Co-authored-by: Aleksandar Janicijevic <aleks@vogonsoft.com>
2026-04-20 22:34:11 +02:00
oech3andDaniel Hofstetter e50ddecd08 du: make du -a -s error 2026-04-20 15:05:13 +02:00
Daniel HofstetterandSylvestre Ledru 36db2e62ca du: fix error from needless_borrow lint on FreeBSD 2026-04-13 10:44:13 +02:00
Sylvestre LedruandDorian Péron 32cf4cdf0c du, ls: add integration tests for block size env var behavior 2026-04-07 13:01:43 +02:00
5648194754 Du size_format flag override (#10743)
* du: Extend size_format flag override tests

* du: Extend size_override implementation for '-h' '--si' '-h' '--block-size'

* du: Extend size_format flag override tests

* du: Extend size_format override tests for correct error return with invalid block-size value regardless of override

* du: Refactor size-format parsing code

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-02-07 06:50:42 -08:00
Yuri AstrakhanandGitHub 05204864d6 refactor: inline format! args in a few places (#10730)
* refactor: inline format! args in a few places

* in one spot remove redundant mem alloc

* run clippy fix with mixed
2026-02-07 10:05:44 +01:00
cerdelenandGitHub 2f0ed95119 du: Flags 'm', 'k', 'm' should be POSIX style overriden (#10664)
* du: Flags 'm', 'k', 'm' should be POSIX style overriden

* du: overwriting b flag doesnt deactivate --apparent-size
2026-02-05 03:41:54 -08:00
Andrus SuvalauandGitHub 8d027624b2 du: count links based on inode (#10313)
* du: count links based on metadata

Count links based on metadata in order to produce the same output as GNU dd
2026-01-19 09:05:13 -08:00
28ac732bed du: fix -l/--count-links option not counting hardlinks separately (#9884)
* du: fix -l/--count-links option not counting hardlinks separately

* du: add test for -l/--count-links counting hardlinks separately

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-12-30 23:53:43 +01:00
Kornél CsernaiandGitHub eed7a0aca7 parser: add binary support to determine_number_system and parse_size (#9659)
* parser: add binary support to determine_number_system and parse_size

* docs

* tests

* tests: threshold
2025-12-22 09:24:44 +01:00
5b261bc1af du: handle --files0-from=- with piped in - (#8985)
* du: handle --files0-from=- with piped in '-'

* build-gnu.sh: remove incorrect string replacement

in tests/du/files0-from.pl

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-12-05 23:07:16 +01:00
Laurent Cheylus 384102cd20 du: fix warnings for tests on OpenBSD
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2025-11-09 08:53:54 +01:00
Daniel HofstetterandDorian Péron 80de3aed4c du: fix dead code warnings in test on Android 2025-11-03 20:50:55 +01:00
Christopher Armstrong 1c0214b29d du: ignore env zero blocksize 2025-10-20 07:26:32 -04:00
Sylvestre Ledru a7a5126af5 Improve the tests 2025-09-12 14:23:03 +02:00
Sylvestre Ledru c890a3479a du: port to use the safe io functions 2025-09-12 14:22:33 +02:00
Sylvestre Ledru 2d0985d7fa du: add a test to cover a part of tests/du/threshold 2025-08-27 21:35:19 +02:00
Sylvestre Ledru a712fc305d fix some last clap errors mgmt 2025-08-13 15:28:20 +02:00
Sylvestre Ledru d76a8d1b14 clap localization: address PR review comments
- Make colorize() function private since only used internally
  - Remove redundant colors_enabled checks
  - Add apply_color helper closure to reduce code duplication
  - Remove try_ prefix from function names for consistency
  - Update all utilities to use renamed functions
  - Fix app variable reference in mv utility
2025-08-13 14:15:55 +02:00
Nicolas Boichat 2d63020cd9 du: Add support for reading time-style from environment
Similar as what ls does, but du has an extra compatibility layer
described in the GNU manual (and that upstream dev helped me
understand: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79113 ).
2025-07-30 17:27:22 +08:00
Nicolas Boichat 1272bfc222 du: Add support for +FORMAT time-style
Also add to error text, which... GNU coreutils doesn't do for
some reason.
2025-07-30 17:27:22 +08:00
Nicolas Boichat b8d81adcff du/test_du: Fix ctime fallback on Windows, and test 2025-07-27 12:57:28 +08:00
Nicolas Boichat 96438f2086 test_du: Fix --time=ctime test
It turns out `du` used to test for the wrong thing, `ctime` is
the change timestamp, not creation time.

We have to rely on a regex again, as the change timestamp is the
current time.
2025-07-27 10:57:07 +08:00