Split and Join large files with Linux

Posted by: Mo Mughrabi Add comments

I've been neglecting this blog for a sometime, the last post from Yousef gave me a nice boost to write something new. Today someone came up to me and asked how can he upload a 3GB file into his remote machine. Well, I will try here to explain how you can split a large file into small parts with the size you want and then how you can join them together again, all using your command line.

To split a file, Let's assume you have a file called TV.SHow.avi (300MB) and you want to split it into 50MB files

 
split -b 50m TV.Show.avi
 

this command by default will generate 6 files with unique naming sequence (e.g xaa, xab, xac..etc) now to join the files you can do

 
cat xaa xab xac xad xae xaf xag > TV.Show.NewFILE.avi
 

or

 
cat x* > TV.Show.NewFILE.avi
 

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login