Re: logrotate: extension `date +.%m-%d-%Y`

2004-08-02 Thread peter
Hi,

This works for me, when you have to rotate a lot of different logs, writing a simple 
script isnt as easy as getting logrotate to handle it all for you.

lastaction 
DATE=`date +%F`; mv /var/log/messages.1.gz /var/log/messages-$DATE.gz 
endscript

this is of cource asuming that you are compressing the logs and the extension is left 
as default, ie when logrotate runs it will always create a *.1 file then compress it. 
*.1.gz

It may need a little tweeking to get it working for you.

Hope this helps


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



logrotate: extension `date +.%m-%d-%Y`

2004-06-27 Thread Vadik
I have apache log files rotated with logrotate, I want to add date to 
the log file, so I thought adding:

extension `date +.%m-%d-%Y`
Would solve, but this doesn't work.  What am I doing wrong?
Thanks,
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]