GNU bug report logs - #71309
du --total output does not take in account the --threshold

Previous Next

Package: coreutils;

Reported by: ofnuts <at> gmx.com

Date: Sat, 1 Jun 2024 15:32:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ofnuts <ofnuts <at> gmx.com>
To: bug-coreutils <at> gnu.org
Subject: du --total output does not take in account the --threshold
Date: Sat, 1 Jun 2024 11:38:18 +0200
[Message part 1 (text/plain, inline)]
Hello,

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

Regards



[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.