* Roger on Wednesday, July 14, 2010 at 23:12:02 -0800
> On Thu, Jul 15, 2010 at 08:06:17AM +0200, David Haguenauer wrote:
>> I'd use grep; something like the following:
>>
>> find ~/.maildir/ -type d -name cur -printf '%h ' | grep -v '\.roger/'
>>
>> (Adapt the regexp depending on how strict you need to be.)
>
> Great THANKS! I think this one worked "right out of the box, as is".
>
> I spent hours looking at man find, google, etc and none worked and I thought
> grep -v wouldn't work.
You can circumvent grep by find -E ! -regex, note it takes the
full path, or exclude by negating -name: ! -name. Also -printf is
not portable.
I use something like:
mailboxes `find -E ~/Mail -type d \( -name cur -o -name new -o -name tmp \
! -regex '.*/(_|(Archive|News)/).*' \
-execdir pwd \; \) -prune | tr '\n' ' '`
c
--
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org/
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions