> On Aug 21, 2007, at 5:47 PM, MrC wrote:
> >>> And what can I do to manage this directory so that I only keep 30
> >>> days worth
> >>> of message zipped?
> >>
> >>    Uhh:
> >>
> >> # find /var/virusmails -ctime +30 -exec rm -f {} \;
> >
> > Oh, careful.  This will cause a enormous number of exec's for a
> > directory with an enormous number of files.
> >
> > Better to use:
> >
> >    # find /var/virusmails -ctime +30 -print | xargs /bin/rm -f
> 
>    Very true, but running it more frequently will be much less  
> painful.  I believe xargs does have an option to limit the number of  
> parameters to assemble from stdin to avoid blowing past the maximum  
> command line length...Ahh yes (looking at the man page) -L <num> does  
> that.
> 
>    The find(1) utility in GNU findutils has a -delete option which  
> makes it even easier, but that's not quite universal.
> 
>              -Dave

Thank you Dave and Gary,
It works like a charm. :)
I will use that and make use of cronjob to run every night.

Justin


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to