From owner-freebsd-questions@FreeBSD.ORG Sun Jun 26 00:02:47 2005 Return-Path: X-Original-To: questions@freebsd.org 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 21C8716A41C for ; Sun, 26 Jun 2005 00:02:47 +0000 (GMT) (envelope-from jonc@chen.org.nz) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1E2E43D49 for ; Sun, 26 Jun 2005 00:02:46 +0000 (GMT) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 29B3256423; Sun, 26 Jun 2005 12:02:45 +1200 (NZST) Date: Sun, 26 Jun 2005 12:02:45 +1200 From: Jonathan Chen To: Svein Halvor Halvorsen Message-ID: <20050626000245.GC38082@osiris.chen.org.nz> References: <20050626015255.D15610@maren.thelosingend.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050626015255.D15610@maren.thelosingend.net> User-Agent: Mutt/1.4.2.1i Cc: questions@freebsd.org Subject: Re: Chop off end of file 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: Sun, 26 Jun 2005 00:02:47 -0000 On Sun, Jun 26, 2005 at 01:57:33AM +0200, Svein Halvor Halvorsen wrote: > > I have a ~70GB, of which the last ~50GB is garbage. I know exactly at what > byte I want to cut the file, but I do not have enough free diskspace to do > a > > dd if=orig of=pre bs=... count=.... > > > Is it possible to just chop off the end of a file, without making a copy > of its beginning? truncate(1) is your friend. -- Jonathan Chen | To do is to be -- Nietzsche | To be is to do -- Sartre | Scooby do be do -- Scooby