Split SQL File

We have all had the headache when a SQL file is too big to import into phpMyAdmin and you can’t import via cmd line. There is a simple command line script that will spilt the file after the number of lines you choose.

 split -l 200 ./Downloads/test.sql ./Projects/

200 – line number you split the file on, every 200 lines a new file will be created

./Downloads/test.sql – the original large SQL file you wish to split

./Projects/ – the destination folder where the new file created will be saved