From owner-freebsd-questions@FreeBSD.ORG Sun Jun 26 00:01:30 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 2B39816A41C for ; Sun, 26 Jun 2005 00:01:30 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE3BB43D48 for ; Sun, 26 Jun 2005 00:01:29 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j5Q01ORN003942 for questions@freebsd.org; Sat, 25 Jun 2005 19:01:25 -0500 (CDT) (envelope-from dan) Date: Sat, 25 Jun 2005 19:01:24 -0500 From: Dan Nelson To: questions@freebsd.org Message-ID: <20050626000124.GA9894@dan.emsphone.com> 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> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: 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:01:30 -0000 In the last episode (Jun 26), Svein Halvor Halvorsen said: > 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? It's a dv-file, resulting from "fwcontrol -R". > I left my home and forgot about it. When I returned home, the disk > was full, and now I need to delete the garbage. I know at exactly > what byte to cut the stream. Try the "truncate" command. -- Dan Nelson dnelson@allantgroup.com