Date: Thu, 13 Jan 2011 18:28:24 -0600 (CST) From: Robert Bonomi <bonomi@mail.r-bonomi.com> To: questions@freebsd.org Subject: Re: Simple command to reset / clear all logs? Message-ID: <201101140028.p0E0SODG029203@mail.r-bonomi.com> In-Reply-To: <AANLkTimrKnqKT8fXdq9pN28cY=7K9jcrtJoHj1HLDMAg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> From owner-freebsd-questions@freebsd.org Thu Jan 13 01:26:33 2011 > Date: Thu, 13 Jan 2011 01:20:14 -0600 > From: Adam Vande More <amvandemore@gmail.com> > To: Redd Vinylene <reddvinylene@gmail.com> > Cc: questions <questions@freebsd.org>, Bernt Hansson <bernt@bah.homeip.net> > Subject: Re: Simple command to reset / clear all logs? > > On Wed, Jan 12, 2011 at 1:50 PM, Redd Vinylene > <reddvinylene@gmail.com>wrote: > > > Will the logs automatically create themselves? I mean, I picture I have > > to manually touch a lotta them in order to avoid "cannot find" error > > messages? > > > > 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." > Typically if a service is running and you delete the log from it, > the service will not like it. You can HUP the service to have it restart > logging, but you'd have to do it manually for each log you deleted. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101140028.p0E0SODG029203>