Split a file into many parts and then rejoin them


Split the files

By number of lines per file:

split -l 100 myFile myFileSplit

Where "myFileSplit" is the prefix that will be applied to each splitted file; e.g.: myFileSplit.a, myFileSplit.b, etc.

By resulting file sizes:

split -b 64k myFile myFileSplit

Re-join the files

cat myFileSplit* >> myFile