From owner-freebsd-questions Fri Dec 13 5:30:57 2002 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 368CD37B401 for ; Fri, 13 Dec 2002 05:30:56 -0800 (PST) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0956843E4A for ; Fri, 13 Dec 2002 05:30:55 -0800 (PST) (envelope-from andre.albsmeier@mchp.siemens.de) Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.11.6/8.11.6) with ESMTP id gBDDUrw08079; Fri, 13 Dec 2002 14:30:53 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail3.siemens.de (8.11.6/8.11.6) with ESMTP id gBDDUq322871; Fri, 13 Dec 2002 14:30:52 +0100 (MET) Received: (from localhost) by curry.mchp.siemens.de (8.12.6/8.12.6) id gBDDUqUY080795; Date: Fri, 13 Dec 2002 14:30:52 +0100 From: Andre Albsmeier To: "Gerald T. Freymann" Cc: Andre Albsmeier , freebsd-questions@freebsd.org Subject: Re: How to truncate a file in the beginning Message-ID: <20021213143052.B1855@curry.mchp.siemens.de> References: <20021213141110.A99587@curry.mchp.siemens.de> <20021213081506.O8685-100000@scaryg.shacknet.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021213081506.O8685-100000@scaryg.shacknet.nu>; from freymann@scaryg.shacknet.nu on Fri, Dec 13, 2002 at 08:15:22AM -0500 X-Echelon: assault, Sears Tower, InfoSec, 747, Saddam Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 13-Dec-2002 at 08:15:22 -0500, Gerald T. Freymann wrote: > On Fri, 13 Dec 2002, Andre Albsmeier wrote: > > > Are there any special features in FreeBSD that I can use > > to truncate a file in the beginning? > > Sure. > > man split > > should do it! Don't think so... from the split manpage: The split utility reads the given file and breaks it up into files of 1000 lines each. If file is a single dash (`-') or absent, split reads from the standard input. ... Maybe my email wasn't very clear regarding this: I can't afford to read the 10GB (or even more) and move them to a new file (this would have to be done on the same disk so it would take too long). I need something that moves the start of the file to a position within the file and discard all bytes upto that position. I had a look at split.c but it does exactly that what I don't need: It reads and writes... -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message