Re: Rotate logs under suse

From: Thomas Peruzzi <thomas.peruzzi@dont-contact.us>
Date: Thu, 14 Oct 1999 10:14:57 +0200

On Wed, Oct 13, 1999 at 06:22:11PM +0200, Peter M. Nielsen wrote:
> Does anyone know how I rotate the logs under suse 6.2. I mean as a daily
> basis. I think I have to make a shell script but what should it look like ?
>
>
> Best regards,
>
> Peter M. Nielsen
> -----------------------------------------------------------------
> Institut for Konjunktur-Analyse
> Aabenraa 29
> 1124 København K
> Telefon: 33 32 82 70
> Telefax: 33 93 03 67
> www.ifka.dk
> ----------------------------------------------------------------
why don't you use the file /etc/logfiles
with the following syntax. I know it is not a real daily rotate, but we for
example backup the log after 16MB size, which looks like
/var/log/squid/access.log +16384k 644 squid.nogroup

A script which could be used is in /etc/cron.daily with the name aaa_base
which reads the /etc/logfiles. I think you only have to adapt it, to work
in real daily mode, if you delete the line with the size-check, modify the
rest, and then it should rotate every day.

bye

tom
path_to_squid_log/xxx.log +size k perms owner.group

-- 
-----------------------------
ICS
Dipl.-Ing.(FH) Thomas Peruzzi
thomas.peruzzi@fh-sbg.ac.at
http://www.fh-sbg.ac.at/ics
0043 662 4665 653
-----------------------------
Received on Thu Oct 14 1999 - 02:25:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:49 MST