GNU bug report logs -
#28890
Painfully slow: DU.exe -Ssb %CD%
Previous Next
Reported by: Gavin Holt <holtgavin <at> gmail.com>
Date: Wed, 18 Oct 2017 15:41:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28890 in the body.
You can then email your comments to 28890 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#28890
; Package
coreutils
.
(Wed, 18 Oct 2017 15:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gavin Holt <holtgavin <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 18 Oct 2017 15:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#28890
; Package
coreutils
.
(Wed, 18 Oct 2017 19:09:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
man ncdu ? NCurses disk usage
Le 18/10/2017 à 14:12, Gavin Holt a écrit :
> 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
>
>
>
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#28890
; Package
coreutils
.
(Wed, 18 Oct 2017 20:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 28890 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#28890
; Package
coreutils
.
(Thu, 19 Oct 2017 01:06:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 28890 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Great, thanks!
On 18 Oct 2017 9:53 pm, "Bernhard Voelker" <mail <at> bernhard-voelker.de> 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
>
>
>
[Message part 2 (text/html, inline)]
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 30 Oct 2018 01:31:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
28890 <at> debbugs.gnu.org and Gavin Holt <holtgavin <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 30 Oct 2018 01:31:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 27 Nov 2018 12:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.