From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 04 09:54:50 2021 Received: (at submit) by debbugs.gnu.org; 4 Jul 2021 13:54:51 +0000 Received: from localhost ([127.0.0.1]:40610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m02aA-0006Ty-Lr for submit@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 ) id 1m02a4-0006Tk-P7 for submit@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 ) id 1m02a4-0005Xs-Bx for bug-coreutils@gnu.org; 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 ) id 1m02a2-00012f-OF for bug-coreutils@gnu.org; Sun, 04 Jul 2021 09:54:44 -0400 Received: by mail-pg1-x52e.google.com with SMTP id u14so15333630pga.11 for ; 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 Date: Sun, 4 Jul 2021 16:54:04 +0300 Message-ID: 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@gnu.org Content-Type: multipart/alternative; boundary="000000000000bc0dc905c64c873f" Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=ricky.tigg@gmail.com; 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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
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

<= div>$ find . -type f
./k
./l

Those=C2=A0 '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=3D- -cb
34 ./k
34 total<= /span>

Isn't rather 68 expected?
--000000000000bc0dc905c64c873f-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 04 10:35:24 2021 Received: (at 49381) by debbugs.gnu.org; 4 Jul 2021 14:35:24 +0000 Received: from localhost ([127.0.0.1]:42995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m03DQ-0006Sj-Il for submit@debbugs.gnu.org; Sun, 04 Jul 2021 10:35:24 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m03DN-0006SS-HS for 49381@debbugs.gnu.org; Sun, 04 Jul 2021 10:35:23 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 01AA55C00AF; Sun, 4 Jul 2021 10:35:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 04 Jul 2021 10:35:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zplane.com; h= date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-type:in-reply-to; s=fm3; bh=cJ7c4s+f/AImvS 5kq+T0RrgVmKbYJK7JN+bkKaz8Tpc=; b=Nxf4EIeA9X1TupYUIT2M6g7dmijs/m QfzD3aqbMKBiYzLYQ6AepHJeaFQAaJl4BFxYsh5JHTsNtYauv4J3vU9WjebJQWIX /n06qx6ysf7vsSpS3czJlTP7IP7jAEgXxm8psL3S4E5Eum6LyBxjtv98ShFMAkO5 avHKi8r2yj6edSvi9k8DmpXLCjsJT4jJ5e3wd31QIh2YuuG+l56loyNBiKpKLiCz Yh7Hsr9Xenq2BEqfrNpIgzfIyNBOKXf/e2qim2HX+E3aGOPaohhiSDWCaPOipZlW tqmBie56g2P3Wavu0CbyR/XARztD4DaBIz0WiJM2drceF9vIzWfpRhhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:reply-to:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=cJ7c4s+f/AImvS5kq+T0RrgVmKbYJK7JN+bkKaz8Tpc=; b=AdqErNeo 696jGe/KkAjAJB51VLnwKSMTh03IXZ8m5ktAxPzl/2gITrXoeFFl7T86lrhhmG0V It34GrckhlfEvj0AFfgniVXeW5ggr84ychmyigdYjUQ9j7NEvxzq+cdWGKcX0qhs c2i3WthubL4ZsR6qg+PJbZxFY5oqnLxVj7EL1cbYMmDT/6UVRT6iEU30OArQ1Xp3 dxjLAmhyhWDtl+lpEZMrqLJa8SyQchg0c0H7vt4hat/41PgiAa2kL6MRfiu8DMLw f+SHSmGIlKLpq4NJZU6JJjfqScyHeKaukweY/oW/GGR4/ZKE7OmffAyUxgzkwV05 OjvSfBQvrKGMSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeejvddgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhrfhggtggujggfsehttddttddtredvnecuhfhrohhmpefilhgv nhhnucfiohhluggvnhcuoehgughgseiiphhlrghnvgdrtghomheqnecuggftrfgrthhtvg hrnhepfefhveffgefhieetudekheeihfffhfffgfetieeguefgjefhveffhefgfedugeeu necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghgugh esiihplhgrnhgvrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Jul 2021 10:35:14 -0400 (EDT) Received: by huh.zplane.com (Postfix, from userid 501) id 4F22A638BD; Sun, 4 Jul 2021 08:35:12 -0600 (MDT) Date: Sun, 4 Jul 2021 08:35:12 -0600 From: Glenn Golden To: Ricky Tigg Subject: Re: bug#49381: v.8.32 =?utf-8?B?4oCTIGR1?= =?utf-8?Q?=281=29_|_Calculatin?= =?utf-8?Q?g?= the total size of files | One file covered instead of all Message-ID: <20210704143512.GJ9392@huh.zplane.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49381 Cc: 49381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gdg@zplane.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ricky Tigg [2021-07-04 16:54:04 +0300]: > *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? You probably want to specify --count-links if you want hardlinked files (like your example k and l) to be considered by du as separate files: $ echo foo > k $ ln k l $ du -c k l 4 k 4 total $ du -c --count-links k l 4 k 4 l 8 total From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 04 14:11:28 2021 Received: (at 49381) by debbugs.gnu.org; 4 Jul 2021 18:11:28 +0000 Received: from localhost ([127.0.0.1]:43242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m06aW-000815-Lr for submit@debbugs.gnu.org; Sun, 04 Jul 2021 14:11:28 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m06aS-00080q-EL for 49381@debbugs.gnu.org; Sun, 04 Jul 2021 14:11:26 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 344E716008D; Sun, 4 Jul 2021 11:11:18 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Q7WZSsNmKwpK; Sun, 4 Jul 2021 11:11:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 89D841600AD; Sun, 4 Jul 2021 11:11:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CxR8bqU8uYmV; Sun, 4 Jul 2021 11:11:17 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 63A4416008D; Sun, 4 Jul 2021 11:11:17 -0700 (PDT) Subject: =?UTF-8?B?UmU6IGJ1ZyM0OTM4MTogdi44LjMyIOKAkyBkdSgxKSB8IENhbGN1bGF0?= =?UTF-8?Q?ing_the_total_size_of_files_=7c_One_file_covered_instead_of_all?= To: gdg@zplane.com, Ricky Tigg References: <20210704143512.GJ9392@huh.zplane.com> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 4 Jul 2021 11:11:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210704143512.GJ9392@huh.zplane.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49381 Cc: 49381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/21 7:35 AM, Glenn Golden wrote: > You probably want to specify --count-links if you want hardlinked files > (like your example k and l) to be considered by du as separate files: Yes, that's right. Closing the bug report. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 14:09:38 2022 Received: (at control) by debbugs.gnu.org; 10 Feb 2022 19:09:38 +0000 Received: from localhost ([127.0.0.1]:57158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIEp0-0006gO-B1 for submit@debbugs.gnu.org; Thu, 10 Feb 2022 14:09:38 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIEoy-0006g6-0I for control@debbugs.gnu.org; Thu, 10 Feb 2022 14:09:36 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B8FC516011F for ; Thu, 10 Feb 2022 11:09:30 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OleC_hbwBq1d for ; Thu, 10 Feb 2022 11:09:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 22AB916013C for ; Thu, 10 Feb 2022 11:09:30 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YgcNBCGqNONH for ; Thu, 10 Feb 2022 11:09:30 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id F415D16011F for ; Thu, 10 Feb 2022 11:09:29 -0800 (PST) Message-ID: <2148990e-c257-afee-244d-f47a3eabadd0@cs.ucla.edu> Date: Thu, 10 Feb 2022 11:09:29 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: close 49381 Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 49381 thanks Intended to close it in July, but forgot to actually close it. From unknown Thu Sep 11 14:10:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 11 Mar 2022 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator