HOWTO split files using GNU split
Well here is typical scenario you have two 1GB pen drive and 2GB file transport!!
Contents |
What would you do?
Split is utility that comes with GNU coreutils its really useful at situations like above. It allow the user to split a large file into small manageable size of MB KB or what ever apt to the situation.
For survival sake we make use if only -b and parameters associated with it.
Well here it goes...
My file is of size 1.4 GB i need to split it to a chunk of 700MB
split -b 700m myfile myfile-split
Now you might be wondering what would be the name of second half ?
myfile-split is a typical name that i gave you can choose any name , myfile-split is the base output name when the chunks are made it would create myfile-splitaa,myfile-splitab etc ...
Once complete you can do any operation on your file like compressing it using bzip2 .
Now How do i join ?
On UNIX like system
$cat myfile-split* > myfile
On Windows
>copy /b myfile-split* myfile
SIZE may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.