Linux and Mac OSX: joining .001 HJSplit style files

August 11, 2010

All too often, when you need to download a big file that somebody shared with you over a free file host like rapidshare, you find that they used HJSplit (Windows / Linux) or Split&Concat (Mac Equivalent) to split the big file in smaller parts so they can bypass the file size limit on those free hosts.

It was a pain for me to deal with them, because i refused to install one of mentionned and not-so-professional-looking, closed source programs to ‘concat’ the files again.

Now i found out that if you’re using GNU/Linux or Mac OSX you already have the tools to split and concat right under the hood of your operating system!

to split a large file called ‘bigfile.mkv’ into 100MB parts, type this in the terminal:
split -b 100m -d -a 3 bigfile.mkv output.mkv.
* -b 100m: 100MB parts
* -d: use numeric suffixes (doesn’t work on Mac OSX)
* -a 3: use 3 suffix characters
* output.mkv. : output filename. don’t forget the trailing dot (.)
-> in Mac OSX, the -d option doesn’t work, so the split command only provides .aaa, .aab, etc. names.
-> you’ll need to rename all files to use .001 instead of .000 or .aaa extensions as the first archive file (and increasing names for the other files) to be compatible with HJSplit.

to concat bigfile.mkv.001, bigfile.mkv.002, and bigfile.mkv.003 to the original file, type this in the terminal:
cat bigfile.mkv.001 bigfile.mkv.002 bigfile.mkv.003 > bigfile.mkv
– make sure you respect the order of files! (first 001, then 002, etc…)

that’s it!
Toon

Advertisements

3 Responses to “Linux and Mac OSX: joining .001 HJSplit style files”

  1. Keith Says:

    Thanks for your suggestion. I just searched the method to join the files. I find this method much more elegant than the HJSplit I installed a few minutes ago.
    Keith

  2. Rachel Says:

    Thank you so much. What an elegant and simple solution, works well šŸ™‚

  3. rohit Says:

    Thank you so much ! This is simple and elegant,


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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: