Noobfarm

Home Add Quote


#1035
Added: 2008-11-29

<Carpathia> how can i remove the first 5 lines of a file? its 2.5G so I cant edit it easily
<PrettyConfused> honestly, I couldn't tell you
<Carpathia> i think sed is capable of it, i just dont know how :(
<da1l6> Carpathia. tail -N -11 could do it. never tried, though
<Carpathia> hm dal16, i dont know how many lines are in the line
<Carpathia> in the file
<da1l6> Carpathia, negative values should make it start at that offset (so the --help says) so -n -11 would start at line 11 for example
<Carpathia> tail -n -1 just does the same as tail -n 1
<Carpathia> ahh got it, so simple sed '1,5d' filename