Chop off end of file

2005-06-25 Thread Svein Halvor Halvorsen
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

Re: Chop off end of file

2005-06-25 Thread Dan Nelson
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

Re: Chop off end of file

2005-06-25 Thread Jonathan Chen
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

Re: Chop off end of file

2005-06-25 Thread Svein Halvor Halvorsen
* Svein Halvor Halvorsen [2005-06-26 01:57 +0200] Is it possible to just chop off the end of a file, without making a copy I figured it out. Seems truncate(1) was it. Svein Halvor ___ freebsd-questions@freebsd.org mailing list

Re: Chop off end of file

2005-06-25 Thread Svein Halvor Halvorsen
* Dan Nelson [2005-06-25 19:01 -0500] Try the truncate command. * Jonathan Chen [2005-06-26 12:02 +1200] truncate(1) is your friend. Thanks! I just figured this myself, after remembering that this operation is called to truncate. (Not easy when english is not one's first language)