Find how many lines are within the CSV? wc -l example.csv Split the file, based on number of lines: This will produce a number of files, splitting it based on the number of lines. split -l 1500000 example.csv There is one issue, however, the header line (the 1st line) isn’t copied across to the other files. To fix this, we can manually copy it over: Get the header line: