From: "Brian K. White" <brian@aljex.com>
To: <zsh-users@sunsite.dk>
Subject: Re: quickesy way to zero HUGe log files
Date: Mon, 9 Oct 2006 12:42:01 -0400 [thread overview]
Message-ID: <025101c6ebc1$e7b126c0$6400000a@venti> (raw)
In-Reply-To: <20061009073941.GA17078@localhost.localdomain>
----- Original Message -----
From: "Stanislaw Halik" <sthalik@tehran.lain.pl>
To: <zsh-users@sunsite.dk>
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@aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
prev parent reply other threads:[~2006-10-09 16:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 7:28 zzapper
2006-10-09 7:39 ` Stanislaw Halik
2006-10-09 12:53 ` zzapper
2006-10-09 16:13 ` Dominic Mitchell
2006-10-09 16:42 ` Brian K. White [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='025101c6ebc1$e7b126c0$6400000a@venti' \
--to=brian@aljex.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).