Splitting and joining files

So I bzipped a 40G file last night. I checked the timestamp and it took about an hour to finish with my 8-core cpu. Since the 40G file is a text file, the resulting file is only 1.4G large. Impressive, I went on to get my morning coffee, happy.

Then when I got back, I realized a 1.4G file is still a little too big to transfer it at once. Network failure often happens, and I will need to chop up this file somehow. I did some searches and found that the old school way is to use the split command. I tried that but I got these funny xaa, xab, xac files… ok, fine, I can provide prefixes to them, but still. It’s not intuitive to know how to combine these files back. I suppose a “cat * > file” will do. But what’s the resulting filename? How am I supposed to remember after even just one day? I suppose I can keep a readme file… man, this is last century!

Then I remember rar. It can compress, split, and uncompress/join. osx doesn’t come with rar so we will need to download that.

For compression, I recommend SimpyRAR at http://www.macupdate.com/app/mac/21430/simplyrar. It has a GUI and hecka intuitive. Just drag-and-drop, a few clicking and you are done.

For uncompress, UnRarX (http://www.unrarx.com/) is fine. But if you want a all-in-one uncompress app you may want to try The Unarchiver. It’s on the Mac App Store and it’s FREE. 😉

I successfully splited my 1.4G file into 27 files with 50Mb size. Then double clicking on one of the rar files will give me back my 1.4G file. Life is good! 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s