Saturday, February 20, 2010

How to split your large file into smaller chunk using Linux

There are many ways to send a large file across. Using Bittorrent, P2P, FTP etc. But what if you encounter scenario like sending a email attachment with very limited attachment size, you may find this tool useful

For example, you have  a media file of size 20M and you wish to break it up to 10M chunk, just use the split command that comes with Linux
split -b 10M test-split.wmv
Consequently, the command will break the test-split.wmv into 2 chunk xaa and xab. "xaa" and "xab" are generated by the split command. If you split into more chunk, it will follow the alphabetical order xac, xad etc

To join back the 2 file into a single entity again, just use the good old cat
cat xab >> xaa.
(Do use ">>" as it append data from one file to another)

1 comment:

Ayame said...

A friend of mine used this to send me a file, they are .xaa and .xab...but I dont use linux, how can I recreate the file D:?