[syslog-ng]Rotate my logs files

Gregor Binder syslog-ng@lists.balabit.hu
Mon, 2 Jun 2003 12:05:06 +0200


On Mon, Jun 02, 2003 at 11:58:20AM +0200, Jens Grigel wrote:

Hey,

> # date from day before yesterday
> date2comp=`date -d "2 days ago" +%Y_%m_%d
> # use find to compress the logs
> find /var/log/HOSTS -name "*_$date2comp" -exec bzip2 {} \;

you could also use "find -mtime +2" so you don't need files with
date extensions or to save you from date calculations.

Regards,
  Gregor.