I have a file that contains about 100 million lines of text, and I want to remove the first line of text, but without creating another file. Is there a fast way to remove the first line without writing to a new file as in this solution? sed '1d' huge_file.txt > another_huge_file.txt
The newer GNU version of sed supports the -i, edit files in place, option so you could do something like this: # untested
sed -i '1d' huge_file.txtOther newer scripting languages such as Perl also support the -i option.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |