How to edit a very large file?

I had to remove one line of a 20GB MySQL dump file and was wondering how I could do this.

Actually there are a few ways, but hexdump worked best for me.

aptitude install hexdump

Will get you started on Debian and here is the syntax for editing a file:

hexedit largefile.sql.dump
tab (switch to ASCII side)
move to the position you want to alter/erase
space (repeat as needed until your header is gone)
F2 (save)/Ctrl-X (save and exit)/Ctrl-C (exit without saving)

 

You cannot comment on this entry