On Tue, 2010-11-09 at 22:57 -0800, Karl Meyer wrote: > >This is dangerous. With lots of mail in the (Maildir?) folder, shell > >expansion *quickly* will exceed the command line length limit. > > > > The trailing dot also looks bad. > > This is a good argument. I' ll think about that. The folder is a cyrus Imap > folder. I used the [0-9]*. expression, because each cyrus folder contains > messages with numbered filename with a trailing dot and four cyrus.* files > (cache, index,...). > Use find:
find /var/spool/imap/user/kmeyer/ -name '[0-9]*.' -exec sa_learn {} \; which is a bit slower but avoids the command line overflow by running sa_learn on every matching file. Martin