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

Reply via email to