On 10/25/07, Jon Gale <[EMAIL PROTECTED]> wrote: > What would be the most efficient way to remove x number of lines from a very > large (many gigabyte) file? > > Preliminary tests show that sed is not a good option:
snip > Is there a better way to do this that won't necessitate scanning the entire > file just to remove the first x number of lines? vim test.txt xdd :wq You could turn that into a script in vim with x as a parameter if you wanted to automate it. Or you could do it with a small program that piped the file through a line at a time and didn't write the first x lines out. -- Alex Esplin /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
