Your find is just fine. It's du that's traversing your subdirectories.
Try:
# find / -type d -maxdepth 1 -exec du -s {} \;
On Tue, 13 Nov 2001 16:04:34 -0600 (CST)
dave brett <[EMAIL PROTECTED]> wrote:
> Pattern matching is drivingg me nuts.
>
> This command works the way I want it too:
> find / -type d -maxdepth 1
>
> This does not
> find / -type d -maxdepth 1 -exec du {} \;
> It gave the size of all directories.
>
> So then I tried
>
> find / -type d -maxdepth 1 -exec du {} \; |grep "\/[a-z,A-Z,0-9]^[\/]
>
> The pattern matching did not work the way I expected it to. What I wanted
> was it to reject all lines with a second "/".
>
> Would somebody please point me in the direction for finding out how
> pattern matching works.
>
> By the way, I quickly realized my mistake in getting what I was after.
> The command which did what I wanted (size of each directory)
> find / -type d -maxdepth 1 -exec du --max-depth=0 {} \;
>
> thanks
> david
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list