Bash remove the first line of a large file

Posted on May 16, 2017 at 2:53 pm

On Linux OS, using tail you can quickly remove the first line of a file:

tail -n +2 file > file.new

Alternatively you can use ed (that is still fast):

ed <<< $'1d\nwq' file

You can use also sed, but it is much slower:

sed -i 1d file

Other Posts

Updated Posts