[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: du v5.93: traverses subdirectories although --separate-dirs and --su
From: |
Bo Borgerson |
Subject: |
Re: du v5.93: traverses subdirectories although --separate-dirs and --summarize are set? |
Date: |
Thu, 29 May 2008 09:27:51 -0400 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
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