RE: [logs] Log rotation tools

From: Karyl F. Stein (ksteinat_private)
Date: Thu Sep 13 2001 - 18:20:08 PDT

  • Next message: Andreas Siegert: "Re: [logs] Log rotation tools"

    The only thing to remember with that is you may have to restart / kill -HUP
    the application writing to the log file or it may continue to put data in
    the old file.
    
    -----Original Message-----
    From: Marcus J. Ranum [mailto:mjrat_private]
    Sent: Thursday, September 13, 2001 9:34 AM
    To: Jose Nazario; Subba Rao
    Cc: loganalysisat_private
    Subject: Re: [logs] Log rotation tools
    
    
    
    >homebrew: cp logfile logfile.$TODAY && cp /dev/null logile
    
    It's probably better to use
    touch logfile
    instead of
    cp /dev/null logfile
    on the outside chance that something has actually been written to
    the log file. Also, usually, this is done with the 'mv' command, which
    is faster and less likely to result in more data piling up in the
    old logfile. So what I'd suggest looks more like:
    
    mv logfile logfile.$TODAY && touch logfile
    
    mjr. (a bit rusty with UNIX...)
    
    ---
    Marcus J. Ranum          Chief Technology Officer, NFR Security, Inc.
    Work:                           http://www.nfr.com
    Personal:                      http://www.ranum.com
    
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: loganalysis-unsubscribeat_private
    For additional commands, e-mail: loganalysis-helpat_private
    
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: loganalysis-unsubscribeat_private
    For additional commands, e-mail: loganalysis-helpat_private
    



    This archive was generated by hypermail 2b30 : Thu Sep 13 2001 - 18:55:24 PDT