Nicholas Leippe <[EMAIL PROTECTED]> wrote:

> On Tuesday 07 October 2008 05:58:19 am you wrote:
>> Nicholas Leippe <[EMAIL PROTECTED]> wrote:
>> > Currently, du -x properly excludes other filesystems that are mounted.
>> > But if the same filesystem is mounted again with -o bind (linux,
> possibly
>> > other oses), it still includes them in the count.
>> >
>> > An option to exclude them from the count as well would be convenient.
>>
>> du's --exclude option excludes based on device number,

Whoops.  Here, I meant the -x (--one-file-system) option.

>> and two bind-mounted directories share the same device number,
>> it's not sensible to make --exclude do what you want.
...
> Just to be sure we're on the same page, I'm interested in excluding them
> entirely, not just making sure they only get counted once.
> Eg:
>
> a/
> a/b/
> b/
> mount -o bind b a/b
> du -<some option> a/
> result: only counts a/, skipping both hidden a/b/ and b/ bind mounted
> on top of a/b/
>
> Which is why I referenced the -x option which logically seems similar to
> what I want.

If you know beforehand which directory you'd like to exclude,
then use one of the --exclude=PATTERN or --exclude-from=FILE options.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to