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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Ricky Tigg <ricky.tigg@HIDDEN>; dated Sun, 4 Jul 2021 13:55:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jul 2021 13:54:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 04 09:54:50 2021
Received: from localhost ([127.0.0.1]:40610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m02aA-0006Ty-Lr
	for submit <at> debbugs.gnu.org; Sun, 04 Jul 2021 09:54:50 -0400
Received: from lists.gnu.org ([209.51.188.17]:59548)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ricky.tigg@HIDDEN>) id 1m02a4-0006Tk-P7
 for submit <at> debbugs.gnu.org; Sun, 04 Jul 2021 09:54:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34478)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ricky.tigg@HIDDEN>)
 id 1m02a4-0005Xs-Bx
 for bug-coreutils@HIDDEN; Sun, 04 Jul 2021 09:54:44 -0400
Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:44813)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ricky.tigg@HIDDEN>)
 id 1m02a2-00012f-OF
 for bug-coreutils@HIDDEN; Sun, 04 Jul 2021 09:54:44 -0400
Received: by mail-pg1-x52e.google.com with SMTP id u14so15333630pga.11
 for <bug-coreutils@HIDDEN>; Sun, 04 Jul 2021 06:54:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=QLeSeX0lMakafKNkUbNmgZMpA9NOnblhGqu2xRtUbao=;
 b=dJY7lgBasBIDlA3wxQTYtnI1PPkbmb/6/DNZLWoIr6/uEGnJRwa6DAcSAht4FpyU39
 5S4Bsz+ujWiWxUoGEk6j7mOUM21f4BtC/JA1kf1yB7Fek8/lHqLMVvQfNhf4i0tWfN1H
 3DumDpf0bJ+aHpQHkujsb30MlJOADsOVf9F0vW7ldXNWz6wgK3WwFQNCr4thyPfZK60u
 fOxM35bjg0WxFxCU4rn3tMLklUNA81XmZ4r26eIKHqrvgLGD2NwGeyHCOhPeOxasSbfD
 9lDy0sUwh+CewhJnF86it/7Stj+gVfyhhVV9GdmzO43EZthcyO1hfjrvKjXf5TK8MYtP
 R3lg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=QLeSeX0lMakafKNkUbNmgZMpA9NOnblhGqu2xRtUbao=;
 b=TlXyLAxWhv/BevesO8yLIcZt/Yvp7q55pZhlSD49Cm5IxiH0XEsEWJ1gIFilIgnGk+
 +Xe5QH3EuXkMsTnWNVjIYSDNqoauFkblmelnkz5tvLwXniPrL1ItQfR8YRB/GgFbXhD+
 BPlLD2bhPefyIL5Lozfew21RCHacJ9lxeqjMKWnzLf4DD1aNtsi+B1VOiyboxOxOF7xV
 eYrU/qtbm/dyU7wcE8mTcW44M/VkLkpMR/cHuqt0B4q0UeKl9BIGnL57CqPDEvs8tebf
 VMADypqi6hcVww2KenjtKd35pcUhL0ajDic/YnExQkgnXitdPs7CBBaj1xCMLrqjOtgm
 NW6g==
X-Gm-Message-State: AOAM533s4rcPkMVlacmOD6F2VmuYOMwViPPb0T63pNl/C8lMmZGSEYIU
 /qIjiOarkXmeZLGaQ4Gquu0WBxt6LKlVh6z7/FvBbrQKu+XlHg==
X-Google-Smtp-Source: ABdhPJz6+AYV+gjbK/f5Kq0dxRqthsSwfBrZatg/hD0wICJnVVF2B0+bokxVjQdM298IfvbiQGpwL0/NtIoK50qgkgM=
X-Received: by 2002:a63:eb4f:: with SMTP id b15mr10607696pgk.2.1625406880614; 
 Sun, 04 Jul 2021 06:54:40 -0700 (PDT)
MIME-Version: 1.0
From: Ricky Tigg <ricky.tigg@HIDDEN>
Date: Sun, 4 Jul 2021 16:54:04 +0300
Message-ID: <CAM_8-Cgi=D+n7pB-teeapMEkdspdSXJL-P9yqytQWh+BMAW7Dw@HIDDEN>
Subject: =?UTF-8?Q?v=2E8=2E32_=E2=80=93_du=281=29_=7C_Calculating_the_total_size_of_fil?=
 =?UTF-8?Q?es_=7C_One_file_covered_instead_of_all?=
To: bug-coreutils@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000bc0dc905c64c873f"
Received-SPF: pass client-ip=2607:f8b0:4864:20::52e;
 envelope-from=ricky.tigg@HIDDEN; helo=mail-pg1-x52e.google.com
X-Spam_score_int: 6
X-Spam_score: 0.6
X-Spam_bar: /
X-Spam_report: (0.6 / 5.0 requ) BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000bc0dc905c64c873f
Content-Type: text/plain; charset="UTF-8"

*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?

--000000000000bc0dc905c64c873f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><b>OS:</b> Fedora; Tested in Bash v.5.1.</div><div><b=
r></div><div>Hello. Task: Printing total size of files <b>alone</b>.<br></d=
iv><div></div><div>To reproduce:</div><div><br></div><div><span style=3D"fo=
nt-family:monospace">$ stat -c &#39;%i %h %s %n %F&#39; k l<br>4198568 2 34=
 k regular file<br>4198568 2 34 l regular file</span></div><div><br></div><=
div><span style=3D"font-family:monospace">$ find . -type f<br>./k<br>./l</s=
pan></div><div><br></div><div>Those=C2=A0 &#39;du&#39; commands cover only =
one file instead of all files.<br></div><div><br></div><div><span style=3D"=
font-family:monospace">$ find . -type f -exec du -acb {} +<br>34	./k<br>34	=
total</span></div><div><br></div><div><span style=3D"font-family:monospace"=
>$ find . -type f -print0 | du --files0-from=3D- -cb<br>34	./k<br>34	total<=
/span></div><div><br></div><div>Isn&#39;t rather <i>68</i> expected?<br></d=
iv></div>

--000000000000bc0dc905c64c873f--




Acknowledgement sent to Ricky Tigg <ricky.tigg@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#49381; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 4 Jul 2021 14:00:02 UTC

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