#] #] ********************* #] "$d_bin"'tail notes.txt' # www.BillHowell.ca 13Oct2023 initial # view in text editor, using constant-width font (eg courier), tabWidth = 3 #48************************************************48 #24************************24 # Table of Contents, generate with : # $ grep "^#]" "$d_bin"'tail notes.txt' | sed "s/^#\]/ /" # #24************************24 # Setup, ToDos, #08********08 #] ??Oct2023 #08********08 #] ??Oct2023 #08********08 #] ??Oct2023 #08********08 #] ??Oct2023 #08********08 #] ??Oct2023 #08********08 #] 13Oct2023 +-----+ https://unix.stackexchange.com/questions/96226/delete-first-line-of-a-file Delete First line of a file Asked 9 years, 11 months ago Modified 2 years, 7 months ago Viewed 468k times +--+ This topic is interest, so I test the benchmark in 3 ways: sed '1d' d.txt > tmp.txt tail -n +2 d.txt > tmp.txt sed -i '1d' d.txt Note that target d.txt is 5.4GB file Get the result : run 1 : sed '1d' d.txt > r1.txt 14s run 2 : tail -n +2 d.txt > r2.txt 20s run 3 : sed -i '1d' d.txt 88s Conclusion : It seems below be the quickest way: sed '1d' file.txt > tmpfile; mv tmpfile file.txt edited Jun 10, 2015 at 4:29 TPS answered Jun 10, 2015 at 4:04 waue0920 # enddoc