From unknown Sat Aug 16 18:39:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28890: Painfully slow: DU.exe -Ssb %CD% Resent-From: Gavin Holt Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 18 Oct 2017 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28890 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 28890@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150834124823982 (code B ref -1); Wed, 18 Oct 2017 15:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2017 15:40:48 +0000 Received: from localhost ([127.0.0.1]:48480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4qSe-0006Ek-9L for submit@debbugs.gnu.org; Wed, 18 Oct 2017 11:40:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4nDE-0000eq-Vk for submit@debbugs.gnu.org; Wed, 18 Oct 2017 08:12:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4nD5-0002AX-32 for submit@debbugs.gnu.org; Wed, 18 Oct 2017 08:12:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4nD4-0002AT-VC for submit@debbugs.gnu.org; Wed, 18 Oct 2017 08:12:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nD3-0005WJ-QE for bug-coreutils@gnu.org; Wed, 18 Oct 2017 08:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4nD2-00029o-Sv for bug-coreutils@gnu.org; Wed, 18 Oct 2017 08:12:29 -0400 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:43688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4nD2-00028s-O7 for bug-coreutils@gnu.org; Wed, 18 Oct 2017 08:12:28 -0400 Received: by mail-qt0-x233.google.com with SMTP id j58so9894854qtj.0 for ; Wed, 18 Oct 2017 05:12:27 -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=UeXZJDdCn7YJZBv+TEQJ4qpvKvKPyHwy448/UPq6xro=; b=YPP7E8PiQ9nFErmfNYh6tykv6stO2VpVtwN6o1C4S66zZozOmI65zvRaFMcC9+CX5h tyjhWCxl2o7FRajI2SCtztxpP/D2VbgTquIBUiSif9yyL4iXPM+wNyUipfkoeg+YtxDB lwCajPZGbuna5Z7w6clsCyW1rup/WfZQrUlUDZ0gefz/+GHGwsb1iOA++V/3FFGxh9oF Eit//Y9mOaP2PYI1U/WWzZx7GGfy4tvQVYK7MshMskzDcOr9IIAyIYS5HdqeMPM2SYHB edcFBxWNipktpY732gI3Iesgra4ViHC6WqAqHSE6yP+HpdSiRskKEPiiO/RJoqILEE82 ttww== 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=UeXZJDdCn7YJZBv+TEQJ4qpvKvKPyHwy448/UPq6xro=; b=DbEjWfqdvbk3NWfzgV6ech8Yfrg2dPm9ew6PRoejEjK9AE+X1aqbaIh8LH2pMt1nQB CZjpLo1PK9AO3hAwBnYY1aMZhAQLxaZOjqsJ/JcDU7zHgM+rSiBn9oy/UGNDyOVHpI5L bJpxI/CB6AqZcuZs0qanyWigo0NFlhpc5pgRl8Wf2/QErXcKV8kpcIiFk5vOb7DYq/kF iPJEQgriupxRXpDo+bAI7y59XUGTHqiLliUrKU2h7NQ1HH6QtlPJxAWUYgz5NVC+5O1w wEj8mkoOmB+X3DE0XSgamD9MGNqNmHKNPdszCksDJIC7R2F1/vSlaPZTdQKprnQG1iO7 Ie6A== X-Gm-Message-State: AMCzsaW3FPJwg8BprzFU1zPf5EjzYpfCcBBm6oUzGDHuTu/Zpj74TJ44 MxNb1yRWLN+6/5aUHyVPbXyMe0uthYroE05Hx1uQOQ== X-Google-Smtp-Source: ABhQp+TNr8uM9LJBFo0M6vPFzXerG2ZMkTnoddpN3hyhw6RdFr4TA6Ad4l3A0OFAoirLiuD1ZFAK/UBjpF1FOzw8Ui0= X-Received: by 10.200.49.38 with SMTP id g35mr2536627qtb.32.1508328746513; Wed, 18 Oct 2017 05:12:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.96.196 with HTTP; Wed, 18 Oct 2017 05:12:25 -0700 (PDT) From: Gavin Holt Date: Wed, 18 Oct 2017 13:12:25 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Wed, 18 Oct 2017 11:40:45 -0400 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: -4.0 (----) Hi I am trying to use cmd batch file to list the size of all directories in my roaming user profile - so I an clean it out. DU.exe works well and gives me the exact output I want - the sum of the size of the files in each directory EXCLUDING subdirectories. e.g. P:\MyPrograms\EDITORS\Scite>du -Ssb %CD% 2641767 P:\MyPrograms\EDITORS\Scite P:\MyPrograms\EDITORS\Scite\tools>du -Ssb %CD% 8834439 P:\MyPrograms\EDITORS\Scite\tools I would use a for loop to iterate over all the directories, but testing with a single directory shows this command to be painfully slow. (dir /AD /B /S %USERPROFILE%) Is there any way to optimize the DU function or an alternative you can suggest that gives the identical output. I did read the link below - but the output is not what I wanted. https://stackoverflow.com/questions/30513287/faster-way-to-get-folder-size-with-batch-script Kind Regards Gavin From unknown Sat Aug 16 18:39:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28890: Painfully slow: DU.exe -Ssb %CD% Resent-From: f0rhum Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 18 Oct 2017 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28890 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 28890@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150835373213634 (code B ref -1); Wed, 18 Oct 2017 19:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2017 19:08:52 +0000 Received: from localhost ([127.0.0.1]:48616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4thz-0003Xq-MB for submit@debbugs.gnu.org; Wed, 18 Oct 2017 15:08:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4thy-0003XZ-Iu for submit@debbugs.gnu.org; Wed, 18 Oct 2017 15:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4ths-0000dG-5y for submit@debbugs.gnu.org; Wed, 18 Oct 2017 15:08:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41337) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4ths-0000cw-3P for submit@debbugs.gnu.org; Wed, 18 Oct 2017 15:08:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4thr-0003yz-11 for bug-coreutils@gnu.org; Wed, 18 Oct 2017 15:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4thn-0000aq-Ql for bug-coreutils@gnu.org; Wed, 18 Oct 2017 15:08:42 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:53146) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4thn-0000YD-Kc for bug-coreutils@gnu.org; Wed, 18 Oct 2017 15:08:39 -0400 Received: from [192.168.22.29] (unknown [88.170.160.103]) (Authenticated sender: f0rhum) by smtp6-g21.free.fr (Postfix) with ESMTPSA id A23F2780398 for ; Wed, 18 Oct 2017 19:08:36 +0000 (UTC) References: From: f0rhum Message-ID: Date: Wed, 18 Oct 2017 21:08:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) man ncdu ? NCurses disk usage Le 18/10/2017 =C3=A0 14:12, Gavin Holt a =C3=A9crit=C2=A0: > Hi > > I am trying to use cmd batch file to list the size of all directories > in my roaming user profile - so I an clean it out. > > DU.exe works well and gives me the exact output I want - the sum of > the size of the files in each directory EXCLUDING subdirectories. e.g. > > P:\MyPrograms\EDITORS\Scite>du -Ssb %CD% > 2641767 P:\MyPrograms\EDITORS\Scite > > P:\MyPrograms\EDITORS\Scite\tools>du -Ssb %CD% > 8834439 P:\MyPrograms\EDITORS\Scite\tools > > I would use a for loop to iterate over all the directories, but > testing with a single directory shows this command to be painfully > slow. > (dir /AD /B /S %USERPROFILE%) > > Is there any way to optimize the DU function or an alternative you can > suggest that gives the identical output. > > I did read the link below - but the output is not what I wanted. > > https://stackoverflow.com/questions/30513287/faster-way-to-get-folder-s= ize-with-batch-script > > Kind Regards > > Gavin > > > From unknown Sat Aug 16 18:39:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28890: Painfully slow: DU.exe -Ssb %CD% Resent-From: Bernhard Voelker Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 18 Oct 2017 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28890 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Gavin Holt , 28890@debbugs.gnu.org Received: via spool by 28890-submit@debbugs.gnu.org id=B28890.150835999424730 (code B ref 28890); Wed, 18 Oct 2017 20:54:02 +0000 Received: (at 28890) by debbugs.gnu.org; 18 Oct 2017 20:53:14 +0000 Received: from localhost ([127.0.0.1]:48696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4vL0-0006Qo-4a for submit@debbugs.gnu.org; Wed, 18 Oct 2017 16:53:14 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:63622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4vKx-0006Qb-UF for 28890@debbugs.gnu.org; Wed, 18 Oct 2017 16:53:12 -0400 Received: from [192.168.101.10] ([91.12.164.42]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0M6RLT-1dJnxb2Jhr-00yMOb; Wed, 18 Oct 2017 22:53:04 +0200 References: From: Bernhard Voelker Message-ID: Date: Wed, 18 Oct 2017 22:53:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:y3PQn17VGeB2NYqyXvVz4TLLe70LW+1nC01g173zi9mhhtYeZl1 JcBzQ9AcPvCUbWs5YG8RPECLH7W3GzJ935zT85gSf3LllG4V/0rmQ7o2UMBoW79T/gWiPX/ wgC+GQIw9avhPN590DNh/CXb+4BDZY+DgF4wfvU0TIfIlNni84gD4P1AzrP42EqNzO198rc h6V66gRPre1UQ8VMpaXew== X-UI-Out-Filterresults: notjunk:1;V01:K0:vhf0KK47/vk=:rEvIk1WhQw6WEylpBmlP1R GTrnmez6xzWzMG/9xqCKyXcDLqw7U4ht4JpSxmBPQxUvulWLKTbMyhnp9DrU4JQ3qQMjBU538 Vb8JVqLybu66/u8JtTfdP6Kkdvh0DdhJ+eBhkTjvsq/Dzxh48RuzkraS976iFbJrqkTIsnYOQ znLe4I6A0CSe0zIWEUUecFU1hzzheqckzhnglI82Rd90R1Gfk3axXwRjL51zmGWQZrxiWmeIF 6lEPo3EC7DRT5Gp4nIpIgRdx4qzJGK/S6fPsJL6UC9pe9ko5Y33qOMJUGCmlDUEQ2QH5AeKmD AxD02wZeaZXJs63kcDXb8o1cpUxJJ99do7uxj0qVmFq4s3c4G1SdVtS/ByrzAoS9n5bwBiaOO VqybUJZFWJO5Zvb1A+64HOpE6cNz4bob6H7HUBdjmzs/uQ2eeyS7m+nwrDZhYWBMVygjWr8C9 Tw3IcTWLw+DQcCqpMj32BkKbUa7P3V7n5L9YEZEVy73uWH2r/bbE6oNKnkyWruzhlPXPE+dH0 PG6+3LFSN9DnA4eGP4LA8F/xdxImDUVyr00VuZMA1OITBcaOvoHguhZv2hc40X1jE6xN6vYEs z/LeJQPVBquHGyho+yWvnYd6ZshgFZJz1j7OGgygJl2UPltAC+k8EG8PtcvRJegRSXkLBRj6y 7RQs5Wtxmx0/ekZgVnPEsWL/VVr38obh/kD56CopywyQ5AyYgOxp0VnuPtlXUO8JbGV61KO7R LbFxAq1S1bYYiephvkXA1mM21i/F9yH64tyhe6UcDikcTRFWJGMxpMiu9wI= X-Spam-Score: -2.3 (--) 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 (--) tag 28890 notabug close 28890 stop On 10/18/2017 02:12 PM, Gavin Holt wrote: > Hi > > I am trying to use cmd batch file to list the size of all directories > in my roaming user profile - so I an clean it out. > > DU.exe works well and gives me the exact output I want - the sum of > the size of the files in each directory EXCLUDING subdirectories. e.g. > > P:\MyPrograms\EDITORS\Scite>du -Ssb %CD% > 2641767 P:\MyPrograms\EDITORS\Scite > > P:\MyPrograms\EDITORS\Scite\tools>du -Ssb %CD% > 8834439 P:\MyPrograms\EDITORS\Scite\tools > > I would use a for loop to iterate over all the directories, but > testing with a single directory shows this command to be painfully > slow. > (dir /AD /B /S %USERPROFILE%) > > Is there any way to optimize the DU function or an alternative you can > suggest that gives the identical output. > > I did read the link below - but the output is not what I wanted. > > https://stackoverflow.com/questions/30513287/faster-way-to-get-folder-size-with-batch-script Given that you have 'du.exe' from Cygwin (so that you have the latest gear), I'd go with a combination of 'find' to get directory names and 'du' to print the sizes; I'd also use --threshold=SIZE to exclude directories smaller than SIZE: $ find . -depth -type d -exec du -hxSt 10M '{}' + or with a pipe: $ find . -depth -type d -print0 | du --files0-from=- -hxS --threshold=10M Finally, as you asked for Windows, I want to mention a very useful graphical tool: "windirstat". As this is more a question how to use du(1) - and not a bug - I'm marking this issue as such in our bug tracker. Have a nice day, Berny From unknown Sat Aug 16 18:39:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28890: Painfully slow: DU.exe -Ssb %CD% Resent-From: Gavin Holt Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 19 Oct 2017 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28890 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: 28890@debbugs.gnu.org Received: via spool by 28890-submit@debbugs.gnu.org id=B28890.15083751486989 (code B ref 28890); Thu, 19 Oct 2017 01:06:02 +0000 Received: (at 28890) by debbugs.gnu.org; 19 Oct 2017 01:05:48 +0000 Received: from localhost ([127.0.0.1]:48904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4zHQ-0001of-1N for submit@debbugs.gnu.org; Wed, 18 Oct 2017 21:05:48 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:56493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4zHO-0001oT-6B for 28890@debbugs.gnu.org; Wed, 18 Oct 2017 21:05:46 -0400 Received: by mail-qk0-f178.google.com with SMTP id l194so8543720qke.13 for <28890@debbugs.gnu.org>; Wed, 18 Oct 2017 18:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GoyY6uwq0nK8a1nB+8K+k4YZoHx4JvXunDekcDEIYwA=; b=riW8353t8BsgoJ3HXvkwR4PQs6rJZg9OrIpzbMRs0wzwxcQh/1AT230UQrVOjrWVrz G30joY3dNuJwRVv4YO5u5QXb4DTO5QJha33GYa+IJdJsX2GoP/ImagxZerDjotYgu2Dq vEybFu/6uoF66PA7nibcD2ePiINvIOM3bXBKPT5EEVG25nVS5eqpWHH2iiSWw0drtOdt HU4J1Ey6EYZOQU/r5nkyIiddcxBsN+d94VwxcrbBY1anpCot8X1YZoDo/M1kJCvAI3ij B2dnsmH4IC0oQ7f3yw7OAwCo/1gVnuEXbYVGKBIZLJaANOyI8HCh2s47GbTSNcUTfgaA YZ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GoyY6uwq0nK8a1nB+8K+k4YZoHx4JvXunDekcDEIYwA=; b=t0nfK9jTLCScG1uWhgNh1TTtVeSvvsXA99frmQvNLT6gIKemFkygGo0NLjBvPczMXh KUmtpHjO4kHuqJCvTWOx/H4zyWBfyUInAhGqdraTmMYNCBCnFLtr4X++SZxk/kPS5Gik dDAirdh0DjIZ4y0dRJAe18do07iJmc1oCGeEmPxX3JBHo4YNb/vF8yGPWP+48g+M4pzU py3pFia1DmOtKf4yR7eWPC/oXssD9r1uhDJdDJMIVqW3y00j+xmI6RoOWscd2aghYHd4 H9RXO7+lRZ8q9BTpysVm31nOyaghJrXNokizApYUmOj6dhQUx+STD2Q8ga3C2eNHSYo4 BSIQ== X-Gm-Message-State: AMCzsaVRkotCBSXHKOeRd5CMd469t3+U++Ne3evsTB7uJxaWq9aQ4tD1 S8nIbeyJK9mwPxx8OOusprd5ZhtoI0xQbXU9KDo= X-Google-Smtp-Source: ABhQp+T1HI5QZGFtxkOtAaFXBPMgXNo7aZPLdzBlbMkEKsC93FBqlMddkETb19MTQVxFEkNPz0lYN+A7eLfOGMdfx0k= X-Received: by 10.55.65.23 with SMTP id o23mr5256250qka.49.1508375140827; Wed, 18 Oct 2017 18:05:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.96.196 with HTTP; Wed, 18 Oct 2017 18:05:39 -0700 (PDT) Received: by 10.140.96.196 with HTTP; Wed, 18 Oct 2017 18:05:39 -0700 (PDT) In-Reply-To: References: From: Gavin Holt Date: Thu, 19 Oct 2017 02:05:39 +0100 Message-ID: Content-Type: multipart/alternative; boundary="001a114ac54c750a8d055bdbf4f4" X-Spam-Score: 0.5 (/) 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: 0.5 (/) --001a114ac54c750a8d055bdbf4f4 Content-Type: text/plain; charset="UTF-8" Great, thanks! On 18 Oct 2017 9:53 pm, "Bernhard Voelker" wrote: > tag 28890 notabug > close 28890 > stop > > On 10/18/2017 02:12 PM, Gavin Holt wrote: > > Hi > > > > I am trying to use cmd batch file to list the size of all directories > > in my roaming user profile - so I an clean it out. > > > > DU.exe works well and gives me the exact output I want - the sum of > > the size of the files in each directory EXCLUDING subdirectories. e.g. > > > > P:\MyPrograms\EDITORS\Scite>du -Ssb %CD% > > 2641767 P:\MyPrograms\EDITORS\Scite > > > > P:\MyPrograms\EDITORS\Scite\tools>du -Ssb %CD% > > 8834439 P:\MyPrograms\EDITORS\Scite\tools > > > > I would use a for loop to iterate over all the directories, but > > testing with a single directory shows this command to be painfully > > slow. > > (dir /AD /B /S %USERPROFILE%) > > > > Is there any way to optimize the DU function or an alternative you can > > suggest that gives the identical output. > > > > I did read the link below - but the output is not what I wanted. > > > > https://stackoverflow.com/questions/30513287/faster-way- > to-get-folder-size-with-batch-script > > Given that you have 'du.exe' from Cygwin (so that you have the > latest gear), I'd go with a combination of 'find' to get directory names > and 'du' to print the sizes; I'd also use --threshold=SIZE to exclude > directories smaller than SIZE: > > $ find . -depth -type d -exec du -hxSt 10M '{}' + > > or with a pipe: > $ find . -depth -type d -print0 | du --files0-from=- -hxS --threshold=10M > > Finally, as you asked for Windows, I want to mention a very useful > graphical tool: "windirstat". > > As this is more a question how to use du(1) - and not a bug - I'm > marking this issue as such in our bug tracker. > > Have a nice day, > Berny > > > --001a114ac54c750a8d055bdbf4f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Great, thanks!=C2=A0

=
On 18 Oct 2017 9:53 pm, "Bernhard Voelker&q= uot; <mail@bernhard-voelker.= de> wrote:
ta= g 28890 notabug
close 28890
stop

On 10/18/2017 02:12 PM, Gavin Holt wrote:
> Hi
>
> I am trying to use cmd batch file to list the size of all directories<= br> > in my roaming user profile - so I an clean it out.
>
> DU.exe works well and gives me the exact output I want - the sum of > the size of the files in each directory EXCLUDING subdirectories. e.g.=
>
> P:\MyPrograms\EDITORS\Scite>du -Ssb %CD%
> 2641767 P:\MyPrograms\EDITORS\Scite
>
> P:\MyPrograms\EDITORS\Scite\tools>du -Ssb %CD%
> 8834439 P:\MyPrograms\EDITORS\Scite\tools
>
> I would use a for loop to iterate over all the directories, but
> testing with a single directory shows this command to be painfully
> slow.
> (dir /AD /B /S %USERPROFILE%)
>
> Is there any way to optimize the DU function or an alternative you can=
> suggest that gives the identical output.
>
> I did read the link below - but the output is not what I wanted.
>
> htt= ps://stackoverflow.com/questions/30513287/faster-way-to-get-folde= r-size-with-batch-script

Given that you have 'du.exe' from Cygwin (so that you have the
latest gear), I'd go with a combination of 'find' to get direct= ory names
and 'du' to print the sizes; I'd also use --threshold=3DSIZE to= exclude
directories smaller than SIZE:

=C2=A0 $ find . -depth -type d -exec du -hxSt 10M '{}' +

or with a pipe:
=C2=A0 $ find . -depth -type d -print0 | du --files0-from=3D- -hxS --thresh= old=3D10M

Finally, as you asked for Windows, I want to mention a very useful
graphical tool: "windirstat".

As this is more a question how to use du(1) - and not a bug - I'm
marking this issue as such in our bug tracker.

Have a nice day,
Berny


--001a114ac54c750a8d055bdbf4f4-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 21:30:11 2018 Received: (at control) by debbugs.gnu.org; 30 Oct 2018 01:30:11 +0000 Received: from localhost ([127.0.0.1]:52446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHIrD-0002UQ-7U for submit@debbugs.gnu.org; Mon, 29 Oct 2018 21:30:11 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:38101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHIrB-0002OE-Jc for control@debbugs.gnu.org; Mon, 29 Oct 2018 21:30:10 -0400 Received: by mail-pl1-f179.google.com with SMTP id p7-v6so4685407plk.5 for ; Mon, 29 Oct 2018 18:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=s/1znuoI/q75Nv9bd6/gcrnGXmtik0L9252FJRraTI0=; b=XhkHkz1gCqO8r9qr1u5yUYf6B1whXNhIL6z5zNHL2em6fPXs6xoKLbMrv+njoWTPNI hnVbano8PId08BWB3Z10M4QzrtB4u+nTgm+Zx69tESulMqrEY2S3W/JygTZBqPNfJPfS btgAC+0OWT1+ZiQNr7Mxq0i7k4mYlb/i9zou6lPkxzDHqDhUVN2EhCCXxcR3ZVJcwlPC QSgrk5sumhtOSmIeco4ZYn7hENuk1T/aglkOP7kxzZX5iRMAdMnTr71D0EP3jxQ9zFVB bovHrKPcTNxqfiW7HrIuQMq0WDszyE701s+MsG2qQaQFXf7+XQh3/gz9yITEKU7/OFw3 cc0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=s/1znuoI/q75Nv9bd6/gcrnGXmtik0L9252FJRraTI0=; b=aaAHWy6Ie5WrZAC5Kkl26F7FJYdyIwoG53V0ts/mPEgal/aXNWiEJOffkfEUqo8Tst FaLs8m6E6O7hZDGhoNAQRdg/JFz/1dogBf1ADSI+q7N0qFBh9QG+utzXBrH6AOc+7JqZ 0KyXz3iyAB9haCaflMK0YepK0ulXUNYz7hiS1NDETBxH1G2UZZWwI7pd7WWMySHd/YO3 YiHgvs8xN7K5dX6xIguZvKXBvcldhASK5rkuW5dsEhS3v21ZtqeFCLj2Bx7H0msskZ2+ +Ds5ukZEo5iypn03+ihcU0YVBERPSpV63wKFmYBRg1RGTRRxocjuiknUjj0/E0Hf4UOa X/nw== X-Gm-Message-State: AGRZ1gKzCsdSPef3glka0l1gaPwgUxTpWFdmIEX+nxPIREQcne1Hn0ch xH/aKP08mcj2pdBcAyVoIpX3MOP2sIw= X-Google-Smtp-Source: AJdET5cBozooPbdGNdfbq7Vj0rEvSkDJWc51LqobcD+JgA/4JxEDqOYh8HZIg/knGchLrXh3PkpBCg== X-Received: by 2002:a17:902:4281:: with SMTP id h1-v6mr16724296pld.114.1540863003345; Mon, 29 Oct 2018 18:30:03 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 145-v6sm33219481pfw.17.2018.10.29.18.30.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 18:30:02 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <8f7c93b1-b77e-d1e1-4ee8-58797948d2d4@gmail.com> Date: Mon, 29 Oct 2018 19:30:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 28890 notabug close 28890 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.214.179 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 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: 1.0 (+) tags 28890 notabug close 28890