Monday, May 6, 2024
32
rated 0 times [  32] [ 0]  / answers: 1 / hits: 209357  / 2 Years ago, thu, december 30, 2021, 3:02:11

I need to remove the first 42 lines of a 2GB SQL dump.



I know I can view the first lines using:



head -n 44 dump.sql


But is there anyway to edit or remove them?


More From » command-line

 Answers
6

This seems to be the easiest:



sed '1,42d' test.sql > test2.sql


Remove lines 1-42 from test.sql and save as test2.sql


[#27300] Friday, December 31, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aradxalte

Total Points: 70
Total Questions: 116
Total Answers: 116

Location: Dominica
Member since Sat, Nov 5, 2022
2 Years ago
;