From owner-freebsd-questions@FreeBSD.ORG Tue Jan 12 10:31:45 2010 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 6E644106566C for ; Tue, 12 Jan 2010 10:31:45 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id A29428FC17 for ; Tue, 12 Jan 2010 10:31:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id C24793A3889; Tue, 12 Jan 2010 17:31:42 +0700 (ICT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= references:subject:subject:in-reply-to:from:from:message-id:date :date:received:received:received; s=selector1; t=1263292302; x= 1265106702; bh=WFKS6q3iy5aXzEtIRaekU5ldXZ+rNn9GruTIlBd99So=; b=n QneRM141prbqQ7GV555dawd8IwsTEX4gtJEZg3fh90I7cohWRFsnk9PzgB2tgmd1 4blUxN953n6ukVZQQHaE6o/qFp+MtlIUlKuShuENt1swlx+TQgRsVcLk3A+zJP6w OEcgH8JDtd2dbY4Q1+cr7yE5X9+EZ/vjfY6+3/3zMw= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by localhost (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uPQsAztG77mc; Tue, 12 Jan 2010 17:31:42 +0700 (ICT) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 0CDF53A3853; Tue, 12 Jan 2010 17:31:41 +0700 (ICT) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.14.3/8.14.3/Submit) id o0CAVVIg046782; Tue, 12 Jan 2010 17:31:31 +0700 (ICT) (envelope-from on) Date: Tue, 12 Jan 2010 17:31:31 +0700 (ICT) Message-Id: <201001121031.o0CAVVIg046782@banyan.cs.ait.ac.th> From: Olivier Nicole To: kernel@webrz.net In-reply-to: <4B4C4D2D.2040609@webrz.net> (message from Jos Chrispijn on Tue, 12 Jan 2010 11:21:33 +0100) References: <4B4C4D2D.2040609@webrz.net> Cc: freebsd-questions@FreeBSD.org Subject: Re: Buld echo 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: Tue, 12 Jan 2010 10:31:45 -0000 > I have 35 log files that I want to flush once a day. > In order to keep them exist I now do an 'echo > logfile.log' > How can I do such in one command having the same effect on all log files? You could have a look at newsyslog: it would purge and recreate the files for you, including the right ownership and mode, plus it ciould keep compressed back logs, and notify some process of your choice. Bests, Olivier