From owner-freebsd-questions@FreeBSD.ORG Fri Apr 4 13:36:49 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 D6D4D37B401 for ; Fri, 4 Apr 2003 13:36:49 -0800 (PST) Received: from mallard.mail.pas.earthlink.net (mallard.mail.pas.earthlink.net [207.217.120.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40CB443F3F for ; Fri, 4 Apr 2003 13:36:47 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-009dcwashp0232.dialsprint.net ([63.188.80.232] helo=moo.holy.cow) by mallard.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 191YrU-0001Jx-00; Fri, 04 Apr 2003 13:36:37 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id 4F1FAC9C7; Fri, 4 Apr 2003 16:39:44 -0500 (EST) Date: Fri, 4 Apr 2003 16:39:42 -0500 From: parv To: Jan Grant Message-ID: <20030404213942.GA20042@moo.holy.cow> Mail-Followup-To: Jan Grant , CARTER Anthony , freebsd-questions@freebsd.org References: <200304041227.46615.a.carter@intrasoft.lu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-questions@freebsd.org Subject: 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 21:36:50 -0000 in message , wrote Jan Grant thusly... > > On Fri, 4 Apr 2003, CARTER Anthony wrote: > > > How do I clean the contents of text files without actually > > removing the files? > > man 1 truncate > > This is a command-line utility that directly wraps the appropriate > system call. Some other ways are (bourne shell)... cat /dev/null > file > file ...w/ above three methods, you would/should not have problem w/ binary files too, unlike the "echo -n" method. - parv --