From owner-freebsd-questions@FreeBSD.ORG Fri Apr 4 03:24:21 2003 Return-Path: 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 2BC3037B401 for ; Fri, 4 Apr 2003 03:24:21 -0800 (PST) Received: from mail.cordis.lu (mail.cordis.lu [212.190.217.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id E812943F75 for ; Fri, 4 Apr 2003 03:24:19 -0800 (PST) (envelope-from a.carter@cordis.lu) Received: from mailsvr.intrasoft.lu (mail.intrasoft.lu [212.190.217.251]) by mail.cordis.lu (8.12.8/8.12.8) with ESMTP id h34BRxnf018351; Fri, 4 Apr 2003 13:27:59 +0200 Received: by mail.intrasoft.lu with Internet Mail Service (5.5.2656.59) id <2HMPCKJR>; Fri, 4 Apr 2003 13:21:45 +0200 Received: from intra241.intrasoft.lu (212.190.217.170 [212.190.217.170]) by mailsvr.intrasoft.lu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id 2HMPCKJP; Fri, 4 Apr 2003 13:21:41 +0200 From: CARTER Anthony To: jconner@enterit.com, Stijn Hoop , CARTER Anthony Organization: Intrasoft Date: Fri, 4 Apr 2003 13:24:33 +0200 User-Agent: KMail/1.5 References: <200304041227.46615.a.carter@intrasoft.lu> <20030404103927.GC97057@pcwin002.win.tue.nl> <200304041102.h34B2VVa024586@quasi.concon.homeip.net> In-Reply-To: <200304041102.h34B2VVa024586@quasi.concon.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304041324.33771.a.carter@intrasoft.lu> X-Spam-Status: No, hits=-126.1 required=4.2 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT,USER_IN_WHITELIST version=2.50 X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: freebsd-questions@freebsd.org Subject: Re: [mail_lists] Re: cleaning out files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2003 11:24:21 -0000 Yep, I want to clean out my log files in /var/log, but some of the log files don't get re-created automatically (I get errors at bootup about some logs not existing) if I just rm them. Thanks, Anthony On Friday 04 April 2003 13:00, Jim wrote: > On Friday 04 April 2003 02:39, Stijn Hoop wrote: > > The best way is simply doing: > > bash]$ > filename > > This clears the file out without destroying any open file descriptors on > the file. > > - Jim > > | On Fri, Apr 04, 2003 at 12:27:46PM +0200, CARTER Anthony wrote: > | > How do I clean the contents of text files without actually removing the > | > files? > | > | $ echo -n > $FILE > | > | Works for me, there are various other ways. You will end up with a 0-byte > | file, is that what you mean by 'cleaning'? > | > | --Stijn