From owner-freebsd-questions@FreeBSD.ORG Thu Jan 13 02:23:09 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F435106564A for ; Thu, 13 Jan 2011 02:23:09 +0000 (UTC) (envelope-from rjhjr0@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 24BDE8FC13 for ; Thu, 13 Jan 2011 02:23:08 +0000 (UTC) Received: by gyf3 with SMTP id 3so492896gyf.13 for ; Wed, 12 Jan 2011 18:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=vgRLFvx9q+Wx3XgOHVwZj2Ta/S59rrDIhhRZVz4ngb0=; b=sU/tGlB+IB66CfeIarR/27f606+mFsiMMoRqwGz+dRfU7kIfmPL9HatsHobflza8Qi n07TYCA35rQ8V52Awl5dw0AUMz8zGCo8xLw3zgiVhQ+ZJqxbmSgldUxzMi5Ap5vylxRv fl4E8mNBy56A+Lzw3HpynXP/5zTcsHxkd1knE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=ASaj4ADZ5oVrFSK7vxIPwKJuLMnJZb8IXMLA2gYKWuA4aUTfQNbIjAnat5PO+zBgjZ F1ROn6ZwJyeA37VKIY0llvYZa5IawUsDPaznH3PDHUVowloqXK3qlxXuVvXVcUrvZpg4 ic6m5EBtAMc/NACfc3bT+YhZ5DniSBtspxG8k= Received: by 10.150.96.17 with SMTP id t17mr2934624ybb.172.1294885388223; Wed, 12 Jan 2011 18:23:08 -0800 (PST) Received: from localhost (ip98-163-115-74.dc.dc.cox.net [98.163.115.74]) by mx.google.com with ESMTPS id f13sm858023yhf.33.2011.01.12.18.23.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 18:23:07 -0800 (PST) Date: Wed, 12 Jan 2011 21:23:04 -0500 From: Bob Hall To: freebsd-questions@freebsd.org Message-ID: <20110113022304.GA2455@stainmore> Mail-Followup-To: Bob Hall , freebsd-questions@freebsd.org References: <4D2DE216.6040505@kibug.org> <20110112202145.515b24b3.freebsd@edvax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110112202145.515b24b3.freebsd@edvax.de> User-Agent: Mutt/1.4.2.3i 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: Thu, 13 Jan 2011 02:23:09 -0000 On Wed, Jan 12, 2011 at 08:21:45PM +0100, Polytropon wrote: > On Thu, 13 Jan 2011 02:17:10 +0900, Ryuichiro Hara wrote: > > Hello, > > > > It might be all right to remove all "normal file" logs, > > though you may want to retain all subdirectories. > > > > find /var/log -type f -exec rm {} \; > > > > may do. > > Possible problem: Programs that log to files may be confused > that the file has disappeared. How about simply cutting the > files to zero length? > > # cat /dev/null > /var/log/* or # truncate -s 0 /var/log/* That will save you two keystrokes, and that's important! ;-)