Sounds like you want truncate() but I don't know any command line
interfaces to it. tail and head and it's friends will amount to a
copy/replace and replace too..
perl has truncate so maybe this'll help you some... otherwise you might
have to write it in C. Then submit it for inclusion in the text-utils
package. :)
M.
On Mon, 27 Sep 1999, Robert Kellner wrote:
> Hello,
>
> I'm searching for a way to cut the end of certain files.
> I know, dd works with the skip option, also split is working
> to achieve a good result, but they do not satisfy with large
> files (300MB +), since these progs make copy except for the
> end I want to cut out.
>
> So, is there a smart way to cut the last bytes of a large file
> without having to duplicate it?
>
>
trunc.pl.gz