Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our servers are running Ubuntu Linux, and the binary file is a BSON dump of a large MongoDB collection. How reliable is a tool like split? Is there a faster or better way to do this?

share|improve this question

migrated from Jul 6 '10 at 1:58

This question came from our site for professional and enthusiast programmers.

To split, split -b

To join, just cat.

AFAIK they are completely reliable, and I doubt there is something more efficient.

share|improve this answer

split is very reliable. We use it for porting large log files, and it worked well for up to a couple of GBs ( not 50 gb anyway ).

I believe you can try using the split for your requirement, and let us know.

Split into 5GB files

split --bytes=5G inputfile

It will split into multiple files of 5GB and name it as xaa, xab, xac, .... and so on.


cat x* > outfile

by this you can concatenate as single file in the other end.

share|improve this answer
On OS X I had to use split -b50m to make 50 megabyte files. Note no equals sign, note lowercase. – funroll Jul 17 '14 at 20:06

If you have rar installed, it's worked very well for me:

To Separate

rar a -m0 -v5000m newfilename
  • a = add files to archive
  • m0 = no compression
  • v5000m = split into chunks of 5000 megabytes

To Reassemble:

unrar x newfilename.*
  • x = extract


  • CRC on the content of the split archive,
  • split-file ordering kept automatically,
  • multiple files and dirs can be included.
share|improve this answer

You must log in to answer this question.