Volker Badziong wrote:
> Hello,
> 
> I am running "du (GNU coreutils) 5.93". When executing e.g.
> 
>      du --separate-dirs --summarize  /etc/
> 
> you are only interested in the total space consumed by stuff in /etc/, not 
> within any subfolders. But nevertheless du traverses all subdirectories, 
> regardless if "--summarize" is set or not. This has no effect on the produced 
> output / numeric result for /etc/.
> 
> Is there a reason the traversal still happens? This causes a lot of (in my 
> humble opinion) unncessary IO.
> 
> Here is a sample output of running with and without --summarize. Numbers for 
> /etc/ are identical, but IO happens in both cases the same.
> 
> somehost:/ # du  --separate-dirs --block-size=1   /etc/
> 94208   /etc/udev/rules.d
> ...
> 3076096 /etc/
> 
> somehost:/ # du  --separate-dirs --block-size=1  --summarize  /etc/
> 3076096 /etc/


I think du actually has to traverse the whole tree in both cases.  The
difference as I understand it with `--summarize' is that information is
only _printed_ for the top level.

Bo



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to