From owner-freebsd-questions Sun Sep 1 11:14:52 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6404837B400 for ; Sun, 1 Sep 2002 11:14:49 -0700 (PDT) Received: from perimeter.co.za (obelix.perimeter.co.za [209.212.102.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id E946A43E3B for ; Sun, 1 Sep 2002 11:14:45 -0700 (PDT) (envelope-from bsd@perimeter.co.za) Received: from asterix (ndf-dial-196-30-125-119.mweb.co.za [196.30.125.119]) (AUTH: LOGIN bsd@perimeter.co.za) by perimeter.co.za with esmtp; Sun, 01 Sep 2002 20:14:39 +0200 Message-ID: <011201c251e3$81035320$0200000a@perimeter.co.za> From: "Patrick O'Reilly" To: "David Banning" , questions@freebsd.org References: <20020901030500.A89971@skytrackercanada.com> Subject: Re: logs take up too much space Date: Sun, 1 Sep 2002 20:15:02 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: "David Banning" > My logs grow so big that my /var section of the drive gets full. > > Is there a way to set the log so that it trims the length of the log? > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message David, I see some people have already pointed you at newsyslog. In your case, where /var is evidently a little small, the option you might be specifically interested in is '-a'. This allows you to specify a directory where the rotated logs will be placed. By default they all remain where the logs are. You will find that the standard /etc/crontab has an entry to run newsyslog daily. It looks like this: --- 0 * * * * root newsyslog --- If you add the -a argument like so: --- 0 * * * * root newsyslog -a /another/path/for/rotatedlogs --- Then the rotated logs will be placed into that path, where you have ample space. But the current logs which you might be referring to from time to time will still be where they usually are, in /var/log . --- Regards, Patrick O'Reilly. ___ _ __ / _ )__ __ (_)_ __ ___ _/ /____ __ / __/ -_) _) / ~ ) -_), ,-/ -_) _) /_/ \__/_//_/_/~/_/\__/ \__/\__/_/ http://www.perimeter.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message