Have you ever needed to split a file into several parts? Today I made a VirtualBox Appliance which sizes 2.8 GB but I have a 2 GB (1.8 Gb) pendrive. So, what can I do?…piece of cake, to use split and cat commands:
Split
Let’s say you want to split the file Draco.vdmk (a VirtualBox disk) into 1.5 Gb smaller parts, then just type:
split -b 1500m Draco.vmdk
Cat
In order to put thing together just use:
cat x* > Draco.vmdk

Planeta Linux
#1 by Skip on 07/06/2010 - 11:43 pm
Nice, this is what I was looking to find out… I would like to see some output though… For instance, since I first saw some stuff on using the split command, they mentioned the way it names the output files, per your example, I’m guessing x?????
Anyways, thanks for letting me know it works with virtual disks!
#2 by Luis Gallardo on 08/06/2010 - 1:38 pm
@Skip Yes, the split command creates output files with this format xaa, xab, xac, etc. But you can change the prefix. For instance,
The above command makes the following files:
Cheers!!