bug#71309: du --total output does not take in account the --threshold
Collin Funk <[email protected]> Fri, 28 Nov 2025 10:50:02 -0800
| Newsgroups | gmane.comp.gnu.core-utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi, You wrote: > In a directory with this: > > $du --total * > 10240 10-Megs > 20480 20-Megs > 61444 60-Megs > 81924 80-Megs > 174088 total > > I would expect du --total --threshold -50M * to be > > $du --total --threshold -50M * > 10240 10-Megs > 20480 20-Megs > 30720 total > > ie exactly as if I had asked: > > $du --total 10-Megs 20-Megs > 10240 10-Megs > 20480 20-Megs > 30720 total > > But the actual output is: > > $du --threshold -50M --total * > 10240 10-Megs > 20480 20-Megs > 174088 total > > and so the total includes all the files scanned, and not just the files > displayed. > > I see this in coreutils 8.32, but the culprit code seems to still be > there in the current master branch I agree it is a bit unclear, but FreeBSD operates the same way. Therefore, I am inclined to keep the existing behavior. Collin