Splitting large files in Linux
split will split one file into several smaller parts. If you have an individual file named ‘bigfile.tar’ which is 4 GB in size, you can split it into 3 smaller parts with this command:
split -b 1500m bigfile.tar
This will give you 3 files with names ‘xaa’, ‘xab’ and ‘xac’. The two first ones have the size of 1500 MB (as requested by option ‘-b 1500m’) and the 3rd one is about 1000 MB (what was left after the first 2 files). You can also define the prefix for the splitted files (previously ‘x’) with the command:
split -b 1500m bigfile.tar myprefix
…which will give you files named ‘myprefixaa’, ‘myprefixab’ and ‘myprefixac’.
When you want to use your big file again, you have to paste it together. This can be done with cat:
cat xaa xab xac >> bigfile.tar
Please, note that the order of split files is important and that you need all the split files to retrieve your original file. In most cases, even one missing split file will make it impossible to retrieve any of your original data.
(Adapted from http://www.ami.tkk.fi/instructions/split.htm)