[cod] Log file rotation

Daniel M. Temme cod at schlechteverlierer.de
Wed Jan 28 05:05:58 EST 2004

On Tuesday 27 January 2004 22:32, Boco wrote:
> Would it be possible to copy the file to another directory, then erase
> the contents of the file?  Could that make it work?

If you use logrotate (i think its now installed by default on Debian systems 
and likely RH too but YMMV) the directive 'copytruncate' pretty much does 
exactly what you want. Check the man-page on how to configure it. A sample 
config might look like this:

/home/cod/games_mp.log {
           rotate 5

But I don't think that is meant to be done hourly. 

Have a nice day
Daniel M. Temme

More information about the Cod mailing list