Split a huge CSV GB File in small parts

?
S
Bash

2 Simple commands to split a file in smaller batches

1# extract and write first 100K lines from main file to a new file
2head -100000 huge.csv >100K.csv
3
4# remove 100K lines from main file ---> go to line 1, select until 100000, write and quit
5ex -sc '1d100000|x' huge.csv
6
7# repeat

Created on 1/14/2021