From owner-freebsd-questions@FreeBSD.ORG Sat Apr 5 13:20:45 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 C7D9737B401 for ; Sat, 5 Apr 2003 13:20:45 -0800 (PST) Received: from quasi.concon.homeip.net (adsl-67-116-217-192.dsl.sndg02.pacbell.net [67.116.217.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9596143FBF for ; Sat, 5 Apr 2003 13:20:43 -0800 (PST) (envelope-from jconner@enterit.com) Received: from there (snafux [192.168.100.13])h34B2VVa024586; Fri, 4 Apr 2003 06:02:32 -0500 Message-Id: <200304041102.h34B2VVa024586@quasi.concon.homeip.net> Content-Type: text/plain; charset="iso-8859-1" From: Jim To: Stijn Hoop , CARTER Anthony Date: Fri, 4 Apr 2003 03:00:52 -0800 X-Mailer: KMail [version 1.3.2] References: <200304041227.46615.a.carter@intrasoft.lu> <20030404103927.GC97057@pcwin002.win.tue.nl> In-Reply-To: <20030404103927.GC97057@pcwin002.win.tue.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Reply-To: jconner@enterit.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 21:20:46 -0000 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 -- - Jim