Chop off end of file
jonc at chen.org.nz
Sun Jun 26 00:02:47 GMT 2005
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
> 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
<jonc at chen.org.nz> | To be is to do -- Sartre
| Scooby do be do -- Scooby
More information about the freebsd-questions