From owner-freebsd-questions@FreeBSD.ORG Fri Jan 14 00:22:58 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2BCD106566B for ; Fri, 14 Jan 2011 00:22:58 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (host-120.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id A7CD18FC19 for ; Fri, 14 Jan 2011 00:22:58 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id p0E0SODG029203 for questions@freebsd.org; Thu, 13 Jan 2011 18:28:24 -0600 (CST) Date: Thu, 13 Jan 2011 18:28:24 -0600 (CST) From: Robert Bonomi Message-Id: <201101140028.p0E0SODG029203@mail.r-bonomi.com> To: questions@freebsd.org In-Reply-To: Cc: Subject: Re: Simple command to reset / clear all logs? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 00:22:59 -0000 > 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 > To: Redd Vinylene > Cc: questions , Bernt Hansson > Subject: Re: Simple command to reset / clear all logs? > > On Wed, Jan 12, 2011 at 1:50 PM, Redd Vinylene > 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. >