On Mon, Oct 09, 2006 at 01:50:11PM -0400, J. Oquendo wrote: > >>Edit /etc/asterisk/logger.conf then asterisk -rx "logger reload" or in > >>cron the dirty way: > >> > >>0 * * * * ls -ltha /var/log/asterisk/|awk '{print $5,$9}'|grep "0 > >>"|grep -v [1-9]|xargs rm -rf > >> > > > >Huh? > > > >Is it supposed to pick files in the csv dirs? > > > > > > No: His original post: > > >In my /var/log/asterisk directory I have 492,018 log files, most of which > >are empty. > >event_log.XXX queue_log.XXX messages.XXX where XXX is an integer. >
In this case, using xargs would exceed the maximal command-line length (about 128kb on Linux). Use a loop: for file in messages.* queue_log.*; do rm file; done Slower, but would work. One hint: check the log rotation configuration. Don't simply rotate /var/log/asterisk/*' . Is this the case? -- Tzafrir Cohen sip:[EMAIL PROTECTED] icq#16849755 iax:[EMAIL PROTECTED] +972-50-7952406 jabber:[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.xorcom.com _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users