🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
3 messages
3 total messages Started by Anonymous Sat, 15 Apr 2017 22:59
Empty Mix Error.Log
#292207
Author: Anonymous
Date: Sat, 15 Apr 2017 22:59
2 lines
921 bytes
What is the best command to empty the contents of /Mix/error.log 
file at midnight every night via a cron job?
Re: Empty Mix Error.Log
#292202
Author: Anonymous
Date: Sat, 15 Apr 2017 23:25
12 lines
1395 bytes
On Sun, 16 Apr 2017 00:59:31 +0200, Anonymous <anonymous@hoi-polloi.org> wrote:

>What is the best command to empty the contents of /Mix/error.log 
>file at midnight every night via a cron job?

I would let logrotate do that for you. Use a rotate 0 specification.

Or I suppose you could try something like:

rm -f /Mix/error.log && touch /Mix/error.log >/dev/null 2>&1

Just be sure you use the full path to the file if what you posted is not it.
Re: Empty Mix Error.Log
#292210
Author: Anonymous
Date: Sun, 16 Apr 2017 00:13
18 lines
1577 bytes
On Sat, 15 Apr 2017 19:25:18 -0400, you wrote:
>
> On Sun, 16 Apr 2017 00:59:31 +0200, Anonymous <anonymous@hoi-polloi.org> wrote:
>
> >What is the best command to empty the contents of /Mix/error.log
> >file at midnight every night via a cron job?
>
> I would let logrotate do that for you. Use a rotate 0 specification.
>
> Or I suppose you could try something like:
>
> rm -f /Mix/error.log && touch /Mix/error.log >/dev/null 2>&1
>
> Just be sure you use the full path to the file if what you posted is not it.

Thanks I'll use the logrotate option. My rotate setting was set for 
1 and the log file size was set to 50k. I reduced the file size to 
20k and changed the rotate setting to 0. Much appreciated.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads