Remove x number of lines from beginning of file
donjuanica at gmail.com
Thu Oct 25 16:24:18 MDT 2007
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:
[root at linuxboy root]# time sed -i -e '1,4d' test2.txt
[root at linuxboy root]# time sed -i -e '1,4d' test.txt
test2.txt is only 100 lines. test.txt is 10,000,000 lines.
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?
What's this? Another BLOG? http://www.jtoo.net/
More information about the PLUG