The linux split command working with .CSV files
I recently had a large csv file (400.000+ lines) which i had to split up into smaller pieces for import to woocommerce. To start withi chose to split them into 15.000 lines which i later found out still was a bit to much. So i went with 3.000 lines.
I used linux split command which was on my raspberrypi by default:
split -dl 3000 --additional-suffix=.csv inputfile outputfile
- The -d flag is added to use numbers 00 instead of letters aa
- The -l flag is for number of lines.
- –additional-suffix=.csv is for adding the file extention.