Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: quickesy way to zero HUGe log files




----- Original Message ----- From: "Stanislaw Halik" <sthalik@xxxxxxxxxxxxxx>
To: <zsh-users@xxxxxxxxxx>
Sent: Monday, October 09, 2006 3:39 AM
Subject: Re: quickesy way to zero HUGe log files


On Mon, Oct 09, 2006, zzapper wrote:
May be O/T what would be the quickest way to zero my huge "in use" Apache
log files?. I usually vim them, but they've got so huge that that's a pain

Truncate them to 0 bytes? ": > /log/file" will do.


You should probably just add them to the log rotater config file.
Suse for example comes with a log rotater installed already and you just need to add file names to /etc/logrotate.conf

Or install your own.This is a simple one I've been using for years on sco systems.
http://www.aljex.com/bkw/sco/#prune

This way they don't grow forever, nor do you lose data, until it grows old enough that you don't care about it and you decide how old that is, if ever. You could set it up to keep creating new date-based filenames forever if you wanted.

Brian K. White  --  brian@xxxxxxxxx  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!





Messages sorted by: Reverse Date, Date, Thread, Author