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

Re: du -x problem



>-"Chris Brown" <CBROWN@seitz.com>
>
> Hi all,
>     I have a problem with du.  When I do a "du * -sx" the "-x" flag 
> should exclude other mounted filesystems, but it doesn't.  I was 
> using v3.16 and then upgraded to 4.00, both don't work right.  Can 
> anybody help?

With du 4.0 -x seems to work for me. Are you sure the problem isn't
caused by using '*' ?

For example, this machine has /home on a separate filesystem:

When I do 'cd /; du -sx .' /home is not included becuse it is
on a different filesystem from .

but if I do 'cd /; du -sx *' /home will be included because the
command is expanded to 'du -sx bin boot ... home ...' . This will
first do a du on bin, then on boot, and eventually on home.
Since home is on the same filesystem as itself it will not be skipped.

-x only skips the directories that are on different filesystems from
the argument currently being processed.

-- 
Making main a void function isn't really bad. The only drawback
is that the compiler is free to generate instructions that launch
nuclear missiles (if you have the necessary hardware), drown your
gold fish or turn your keyboard into a hungry polar bear.


Reply to: