rotate.conf:
/home/card/cardc/tmp/cslog.* /home/card/cardc/tmp/*.log {
sharedscripts
prerotate
/bin/mkdir /home/card/cardc/tmp/`/bin/date +%Y%m%d`
endscript
copytruncate
ifempty
nomail
dateext
postrotate
/bin/gzip /home/card/cardc/tmp/*-`/bin/date +%Y%m%d`
/bin/mv /home/card/cardc/tmp/*.gz /home/card/cardc/tmp/`/bin/date +%Y%m%d`
endscript
}
/home/card/cardc/dat/*.log /home/card/cardc/dat/*.out /home/card/cardc/dat/batchLog.* {
sharedscripts
prerotate
/bin/mkdir /home/card/cardc/dat/`/bin/date +%Y%m%d`
endscript
copytruncate
ifempty
nomail
dateext
postrotate
/bin/gzip /home/card/cardc/dat/*-`/bin/date +%Y%m%d`
/bin/mv /home/card/cardc/dat/*.gz /home/card/cardc/dat/`/bin/date +%Y%m%d`
endscript
crontab -e:
02 04 * * * /usr/sbin/logrotate -f /home/ca