#!/bin/sh
# Run this as root. Stick in crontab. Don't run more than
# once a day.
date = 19990804 # write a quick prog to generate this and backtick it
LIST = 'messages syslog' # list of files in /var/adm to cycle
for FILE in $LIST
do
mv /var/adm/$FILE /var/adm/$FILE.$date
done
# Syslog doesn't like it when you change its files so you need
# restart it with out causing it any grief.
killall -HUP syslogd
gzip /var/adm/*.$date
On Tue, 3 Aug 1999, Donncha O Caoimh wrote:
> Date: Tue, 03 Aug 1999 17:11:18 +0100
> From: Donncha O Caoimh <donncha.ocaoimh at tradesignals.com>
> To: ilug at linux.ie> Subject: Re: [ILUG] logrotate
>> Logrotate is a very nice program that will archive log files.
> It'll chop them every day/week/month and will compress them with gzip if
> you like.
> Very handy program and available on RedHat and Debian and more than
> likely on the other dists too.
> But not on Solaris, along with Perl which I couldn't believe..
>> Donncha.
>> > Yup, solaris is annoying, ain't it? You should try bugfixing for
> > it :-(. Anyway, normally what I do for linux apps on solaris is go to
> > sunfreeware.com first to see if there are any pre-compiled pkgs, then I
> > start looking for src. Logrotate? what's that one do then?
> >
>>
--
Thomas Bridge Hostmaster/Sysadmin, Medianet Ireland.
thomas.bridge at medianet.ie
"The nerds have taken over from the pervs" - anonymous news admin on noting
that comp.binaries.linux had overtaken all the porn groups as the most popular
group of the week,
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!