Split a file in pieces with “split” and put it back together again with “cat”

Many cloud storages have a file size limit. How to split a file in 200mb pieces using the “split” command and how to put it back together again using the “cat” command

Many cloud storages have file size limit. If you just want to put a big file there for storage, you might need to split it up in small pieces. And it’s super easy to do, without anything except the good ol´ command line and it only takes a few second, so here it is.

1. Open your terminal (assuming you use either linux or OSX) and cd to the directory you have stored your file.

2. Decide the size of the pieces you want of the pieces.

3. How to split the file in 200mb pieces using the “split” command
In this example the file is called bigfile.iso

split -b 200m bigfile.iso bigfile.iso.

4. That’s it. The file will now be split in 200mb -pieces with filenames in alphabetical order like bigfile.iso.aa, bigfile.iso.ab etc. (Remember, the full size file is still there, you just made a copy in small pieces)

5. Put it back together again using the “cat” command

cat bigfile.iso.* > bigfile.iso

Voila!