Snort mailing list archives

Re: log rotation scripts?


From: Dr SuSE <drsuse () drsuse org>
Date: Thu, 2 Aug 2001 14:56:46 GMT

Here's one that was written by Chris Mayor

#! /bin/sh
#
# script to rotate logs
# csm 7/01
#
# logfile="/home/snort/test"
logfile=$1
for x in 5 4 3 2 1 0
do
  if test "$y" = ""
  then
    test -f $logfile.$x && rm $logfile.$x
  else
    test -f $logfile.$x && mv $logfile.$x $logfile.$y
  fi
  y=$x
done

cp $logfile $logfile.0
cat /dev/null > $logfile
# gzip $logfile.0

I'm sure this question has been asked many different ways many times before
but here I go again.  Does anyone have any snort log rotation scripts they
are rather fond of and wouldn't mind giving away?  Something suitable for
rotating weekly and back saving a few months would be nice.  Thanks.

Adam

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
http://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users



Score my PGP key @
http://www.drsuse.org/pks

---------------------------------------------
Microsoft ist nicht installiert.
http://www.drsuse.org/



_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
http://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: