go ahead... be a heretic | |
PerlMonks |
Re: Re: Simple Log Rotate Problemby waswas-fng (Curate) |
on Nov 13, 2003 at 22:16 UTC ( [id://306950]=note: print w/replies, xml ) | Need Help?? |
I prefer to cp/truncate instead of deleting. That way you do not have to worry about restarting the service that has the file open for logdumping.
on commandline it looks like this:
its about the same thing in perl except you use File::Copy's copy and move and open OUTFILE, ">logfile"; close OUTFILE; to truncate -Waswas
In Section
Seekers of Perl Wisdom
|
|