SUMMARY Log rotater

From: Robert L. Harris (
Date: Tue Sep 05 2000 - 11:53:39 CDT

To rotate the logs of the process that uses odd names, and doesn't
rotate it's own log when you kill -HUP it I found this pretty:

   for CheckFile in `find /local/sites/gen3/logs ! -name \*gz -size +7484c -print`
# echo Rotating $CheckFile to $NewFile.
     $CP $CheckFile $NewFile
     $CAT /dev/null > $CheckFile
     $GZIP $NewFile

Moving the origina isn't going to work instead of a copy, the open
filehandle follows it. This traverses a 4gig filesystem very quickly
and looks like it's going to work perfectly.

As per getting the programmers to change, it ain't gonna happen here.
Remember, without the programmers, the system is just hardware and
uselss, according to them. As per management back to get the programmers
to change or do some dirty work, that's less likely. Anyone hiring?


Robert L. Harris | Micros~1 :
Senior System Administrator | For when quality, reliability
  at Global Commerce Systems | and security just aren't
                                \_ that important!

      These are MY OPINIONS ALONE. I speak for no-one else.

 perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:16 CDT