I have a 67GB .csv file (I know... I know...)
I need to remove the 4,125,878th line from the file as it is corrupt. My CSV parsing tools won't ignore or skip it.
I could use sed
to do something like
sed '4125878d' in.csv > out.csv
But that would be an hugely expensive operation in terms of time and disk space.
If I use sed -i '4125878d' in.csv
, the operation takes ages.
Is there a way I can quickly remove a line from the middle of a huge file?
ved
which is a very fast editor. – schily Oct 02 '15 at 14:27