* quickesy way to zero HUGe log files
@ 2006-10-09 7:28 zzapper
2006-10-09 7:39 ` Stanislaw Halik
0 siblings, 1 reply; 5+ messages in thread
From: zzapper @ 2006-10-09 7:28 UTC (permalink / raw)
To: zsh-users
Hi
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
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: quickesy way to zero HUGe log files
2006-10-09 7:28 quickesy way to zero HUGe log files zzapper
@ 2006-10-09 7:39 ` Stanislaw Halik
2006-10-09 12:53 ` zzapper
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Stanislaw Halik @ 2006-10-09 7:39 UTC (permalink / raw)
To: zsh-users
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: quickesy way to zero HUGe log files
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
2 siblings, 0 replies; 5+ messages in thread
From: zzapper @ 2006-10-09 12:53 UTC (permalink / raw)
To: zsh-users
Stanislaw Halik <sthalik@tehran.lain.pl> wrote in
news:20061009073941.GA17078@localhost.localdomain:
> 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.
>
Thanx JWTDO
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: quickesy way to zero HUGe log files
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
2 siblings, 0 replies; 5+ messages in thread
From: Dominic Mitchell @ 2006-10-09 16:13 UTC (permalink / raw)
To: zsh-users
On Mon, Oct 09, 2006 at 09:39:41AM +0200, Stanislaw Halik wrote:
> 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.
"cp /dev/null /log/file" is another way. The only reason I mention it
is that I find it easier in combination with sudo.
-Dom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: quickesy way to zero HUGe log files
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
2 siblings, 0 replies; 5+ messages in thread
From: Brian K. White @ 2006-10-09 16:42 UTC (permalink / raw)
To: zsh-users
----- 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!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-10-09 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09 7:28 quickesy way to zero HUGe log files 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
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).