Date String in rotated Logs

Vassilios Kotoulas fedoralist at kotoulas.de
Mon May 2 03:49:27 UTC 2005


On Sun, 2005-05-01 at 17:06 -0500, John Mahowald wrote:
> lastaction 
> 	DATE=`date +%F`; mv /var/log/messages.1.gz /var/log/messages-$DATE.gz 
> endscript
> 
> Modify to suit your needs.

If I do so, I have to modify each file in /etc/logrotate.d . In this
case I prefer a script via cron which renames all logfiles in a loop.
It's less work ;)

-- 
Vassilios Kotoulas
GPG Key ID 0xb1703df8




More information about the users mailing list