Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 May 1996 21:39:29 -0700
From:      Scott Blachowicz <scott@sabami.seaslug.org>
To:        Terry Lambert <terry@lambert.org>
Cc:        root@fledge.watson.org (System Administrator), questions@freebsd.org
Subject:   Re: /etc/monthly, /etc/daily -- log rotation 
Message-ID:  <199605020439.VAA00231@one.sabami.seaslug.org>
In-Reply-To: Your message of "Wed, 01 May 1996 12:10:21 -0700." <199605011910.MAA09979@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert <terry@lambert.org> wrote:

> Too bad you posted their code and we are all contaminated.  8-(.

Should that be taken as an invitation for everyone to post their favorite log
rotating scripts?  Mine's called logrot:

  #! /bin/sh
  #
  usage="
  usage:
  logrot [-Z | -gz] [-p COMPRESS_PROG] [-O COMPRESS_OPTS] [-nz] [-n NUM2KEEP] file ...
  
  This script rotates the named files through a set of NUM2KEEP previous
  versions of the files. Each backup is named by appending ".n" to the filename
  where ".1" is the most recent backup file, ".2" is the 2nd most recent backup
  file, etc. Each of the backup files is optionally compressed.
  
  option -Z  == '-p compress'
  option -gz == '-p gzip'
  option -nz == No Zero (don't zero-out the current file. Useful when what you
                         want is to maintain several versions of the same file
                         instead of rotate/truncating growing log files)
  default COMPRESS_PROG = ':'   # That is, no compression by default.
  default COMPRESS_OPTS = ''    # Options passed thru to compression prog.
  default NUM2KEEP = 3          # Num of backup files to keep.
  "

If you want the rest I can provide it, along with assurances that it's my
own original creation, free for the taking. :-)

Scott Blachowicz
scott@statsci.com / scott@sabami.seaslug.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605020439.VAA00231>