GNU bug report logs - #49381
v.8.32 – du(1) | Calculating the total size of files | One file covered instead of all

Previous Next

Package: coreutils;

Reported by: Ricky Tigg <ricky.tigg <at> gmail.com>

Date: Sun, 4 Jul 2021 13:55:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Ricky Tigg <ricky.tigg <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: v.8.32 – du(1) | Calculating the total size of files | One file covered instead of all
Date: Sun, 4 Jul 2021 16:54:04 +0300
[Message part 1 (text/plain, inline)]
*OS:* Fedora; Tested in Bash v.5.1.

Hello. Task: Printing total size of files *alone*.
To reproduce:

$ stat -c '%i %h %s %n %F' k l
4198568 2 34 k regular file
4198568 2 34 l regular file

$ find . -type f
./k
./l

Those  'du' commands cover only one file instead of all files.

$ find . -type f -exec du -acb {} +
34 ./k
34 total

$ find . -type f -print0 | du --files0-from=- -cb
34 ./k
34 total

Isn't rather *68* expected?
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 185 days ago.

Previous Next


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