Simple command to reset / clear all logs?

Adam Vande More amvandemore at gmail.com
Fri Jan 14 00:31:23 UTC 2011


On Thu, Jan 13, 2011 at 6:28 PM, Robert Bonomi <bonomi at mail.r-bonomi.com>wrote:

> > From: Adam Vande More <amvandemore at gmail.com>
> >
> > Please don't top post.
> >
> > do something like this:
> >
> > shutdown now rm /var/log/* exit
> >
> > upon reentering multiuser mode, each logging service will create it's new
> > file.
>
> FALSE TO FACT, with regard to any/all files that syslogd(8) uses,
> _unless_ syslogd is invoked with the '-C' option.
>
> Quoting from the manpage:
>    "For security reasons, syslogd will not append to log files that do not
>     exist (unless -C option is specified); therefore, they must be created
>     manually before running syslogd."
>

Wrong, read what I said again.  The appropriate service recreates the log
file.  Any basic system log would be covered by this.  Try it and see.


-- 
Adam Vande More


More information about the freebsd-questions mailing list