Thursday, April 9, 2009

Spliting Files .. the GNU way

Well here is typical scenario you have two 1GB pen drive and 2GB file to transport.

Q. What would to do?

Split is utility that comes with GNU coreutils .It allows 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

Q. What would be the name of second half ?

Well the programmers (guess who wrote it ) are clever ,  myfile-split is the base file name that i gave you can choose any name , when the chunks are made it would create myfile-splitaa,myfile-splitab etc

Q. How to join ?

On UNIX
$ cat myfile-split* > myfile

On Windows
copy /b myfile-split* myfile

No comments :

Post a Comment

Translate