Sunday, April 28, 2019

Split file in Linux

Split file in Linux.

split -l 10000 orginal_file.csv ./splitfiles/file_part_ -d --additional-suffix=.csv

Here, -l is for number of lines in each new file
-d is for numerical appending to new files, here it will be like file_part00.csv, file_part_01.csv etc
--additiona-suffix appends the desired extension to the file

***

No comments:

Post a Comment