Rotating/Trimming Log Files
Posted on 1998-04-29
I want to make a copy of all log files on my servers and then tar and compress them to tape. After this, I would like to trim the log files down. Question--while running a command to trim the files, how do you account for the possibility that the log file(s) could still be written to (since these log files could have open processes). Isn't it possible that even in this fraction of a second that the trim command is taking place and zeroing out the log file, your system could be trying to log new entries that may go into the bit bucket. In a secure system, this could be critical information lost.