Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jun 2005 19:01:24 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        questions@freebsd.org
Subject:   Re: Chop off end of file
Message-ID:  <20050626000124.GA9894@dan.emsphone.com>
In-Reply-To: <20050626015255.D15610@maren.thelosingend.net>
References:  <20050626015255.D15610@maren.thelosingend.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050626000124.GA9894>