Simple command to reset / clear all logs?

Robert Bonomi bonomi at
Thu Jan 13 20:50:41 UTC 2011

> Date: Wed, 12 Jan 2011 20:58:04 +0100
> From: Polytropon <freebsd at>
> Subject: Re: Simple command to reset / clear all logs?
> On Wed, 12 Jan 2011 20:50:04 +0100, Redd Vinylene 
> <reddvinylene at> wrote:
> > Will the logs automatically create themselves?
> Usually not, but it depends on the logging mechanism. If a program 
> continuously re-opens the file (after closing it) in APPEND mode, it 
> should be created if non-existent. But if the program keeps the file open 
> and just writes to it, it can cause trouble. Good programs check the 
> return code of the writing operation and signal an error. Bad programs 
> don't do that, they just keep writing to nowhere. :-)

_syslogd_ *explicitly* does -not- _create_ any log files.  it is documented
in the manpages that it behaves that way.  Whether or not this is a "good 
idea" is debatable, but it does allow you to suppress some logging w/o having
to edit the syslog.conf file and/or re-start syslogd.

> > I mean, I picture I have to manually touch a lotta them in order to 
> > avoid "cannot find" error messages?

Syslog does -not- give any such messages, it just doesn't write the message

More information about the freebsd-questions mailing list