> 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,...).

On 10.11.10 11:12, Martin Gregorie wrote:
> 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.

you can use xargs then to calling sa-learn too often. xargs can push only as
much parameters as fits.

find /var/spool/imap/user/kmeyer/ -name '[0-9]*.' -print |xargs sa-learn

(well, add --spam or --ham to sa-learn of course)
-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I wonder how much deeper the ocean would be without sponges. 

Reply via email to