bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: du reports different results for "."


From: James Youngman
Subject: Re: du reports different results for "."
Date: Wed, 20 Feb 2008 20:47:45 +0000

On Feb 20, 2008 6:58 PM, Richard Ems <address@hidden> wrote:
>
> Hi list!
>
> If I do a "du -s * ." and right afterwards "du -s ." I get different
> values for the actual directory ".".
>
> This is on Linux, openSUSE 10.3, coreutils-6.9-43, xfs filesystem.
>
>
> Example:
>
> # du -s * . | grep "\.$" ; du -s .
> 23227004        .
> 25251176        .
>
>
> Is this correct "du" behavior ?


It's hard to say, because you haven't given us enough information to
form an opinion.  Hang on a minute while I log into your system and
take a look.... see what I mean?

Two things that spring to mind are the possibility that the * is
expanding into a bunch of file names, some of which may begin with "-"
and thus modify the behaviour of du.  ("du -s ./*" is much, much,
safer than "du -s *).

Is there activity in the directories beneath "."?   That will change
the answer du gives, of course.  Try comparing the result of
something like "set -x; du -s . .  ; du -s . ; sleep 60; du -s .".

James.


But




reply via email to

[Prev in Thread] Current Thread [Next in Thread]