11/23/2010

[linux] Split it out

Ever wondered how to transfer a huge file across network without having to worry about disconnection in the middle of the transfer?

How about splitting it into pieces and transfer it piece by piece, that way you won't worry about your connection getting cut off all of a sudden. Then after you have transferred all the pieces, just put it back all together again.

Here's an example

You have a large file about 100mb that needs to be transferred to the other side of the globe

let's split it into 15m each until the size is consumed, by default the prefix of the file is x followed by some letters

to make the file pieces more descriptive let's specify a prefix

we can have numeric suffixes too

to restore the file, we use cat for this job
simple and easy :)

2 comments:

Paolo said...

try lxsplit, the linux "port" of hjsplit. it's a more common way of splitting/concatenating files. compatible with mac, linux and windows.

pinoyskull said...

thanks for sharing that Paolo