[thelist] monthly logs linux/apache

Schoolcraft, Jeffrey JSchoolcraft at SytexInc.com
Fri Apr 12 06:42:01 CDT 2002


You seriously want to look at logrotate.

You can define POSTROTATE and PREROTATE scripts that can do just about
anything.  You could easily enough come up with a script to rename the file
(something like dsuffix=`date +%Y.%m.%d` and then just mv foo foo.$dsuffix )

You can also have it tar / gzip things up (tar -zcvf foo.$dsuffix.tgz
foo.$dsuffix ) though you might just want to gzip single logs.

Here's an online version of the manpage:
http://nodevice.com/sections/ManIndex/man0735.html

If there was a windows equivalent (and free) nt admins across the world
would rejoice, but for now, they'll have to just envy us.

Jeff



More information about the thelist mailing list