How to Remove the Last 2 Lines of a Very Large File

Posted by Russ on Super User See other posts from Super User or by Russ
Published on 2010-04-05T23:25:01Z Indexed on 2010/04/05 23:33 UTC
Read the original article Hit count: 220

Filed under:
|
|

I have a very large file ~400G, and I need to remove the last 2 lines from it. I tried to use sed, but it ran for hours before I gave up. Is there a quick way of doing this, or am I stuck with sed?

© Super User or respective owner

Related posts about sed

Related posts about linux