Thursday, December 18, 2008

How to unrar and combine multiple RAR files on Ubuntu

Hello all,

Those of us who download movies or TV series are familiar with the
situation that there are multiple RAR files for a movie or TV series
episode or a game like:

abcd-part1.rar
abcd-part2.rar
abcd-part3.rar

Now, in windows, using winRAR, nothing else is needed to be done to
uncompress and combine the files except for choosing any one file and
give the command 'Extract Here...'. What should I use on Ubuntu /
Linux Mint for this?



--
Hafiz Imtiaz
0306005
EEE,BUET
PH: 01915698207

Try this:
find -type f -name '*.rar' -exec unrar x {} \;

It worked. Thanks a lot.

wouldn't "unrar abcd-part1.rar" be simpler? or any specific reason he should use find? just curious :).

Regards,
Tareq Ahmed Siraj

you can install "RAR" from the add remove , then you can Extract those files
by only clicking the "Extract Here..."

the RAR is almost like a Addon it works with the Default Archive manager.


--
[saikat]
www.nasirkhan.co.cc
আমার ব্লগ: http://nasir8891.wordpress.com


Yah, it would be simpler if you had only ONE rar file. There is a way to divide a single file into few smaller rar files. Hafiz asked question about those files. I believe you have seen those if you have downloaded big files (eg: movies) from sites like megaupload or rapidshare.

-----

tanjir



visit http://www.tanjir.net


In that case in splited archive, start Extract the first part by right
button "Extract Here...", rest will do its own. You need not to join the
split RAR first and then extract.

Rar is good for extracting its own archive. No doubt about that.
But 7-zip is open source and supports many more format including rar.
So I dont use rar anymore. I use 7-zip in both windows and linux.

Use 7-zip. Its really a good alternative.


--
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!


7 zip is best for ascii text type file

I have uncompressed the files and combined them [automatically] using
the built in archeive manager in Linux Mint 6. No problem with that
software yet.
- Show quoted text -
--
Hafiz Imtiaz
0306005
EEE,BUET
PH: 01915698207
www.hafizimtiaz.co.nr

You have "unrar" package installed by default on Linux Mint 6, thats why
your archive manager can uncompress it correctly. But in Ubuntu, you need to
install "unrar" first and then archive manager would able yo uncompress the
RAR files, otherwise not.
- Show quoted text -
--
বাংলায় লিখুন, বাংলায় পড়ুন..
WRITE IN BANGLA, READ IN BANGLA, VISIT http://omicronlab.com

Umm... if youre talking about multi-part rar archives, unrar picks up the rest of the chain of parts if you only give it the first one (at least for my unrar 3.71b does it). find will actully execute unrar for every part the archive has (if it has 10 parts, it will extract the whole thing 10 times) :) ... or I am missing the bigger picture here.

A little correction to my previous response ... i forgot the "x" command for unrar... so it should be:
unrar x abcd.part1.rar


Regards,
Tareq Ahmed Siraj

The other nine times unrar should fail. Because on multi-part rar
archive, you cannot unrar if you don't start from the first part. So,
find command passes 10 files to unrar individually of which only the
first file will be extracted and the other 9 times it will fail.
However, if unrar is smart enough to find the first part
automatically, then you end up with 10 times unarchiving the same
file.

It is common sense to use only the first file to unarchive because it
is splitted by the rar program itself. And it can remember how did it
split the files. Also in windows you do not double click or 'extract
here' on every single file, do you?


--
M. Nasimul Haque, M.Sc.(SUST)
Wessex Institute of Technology
Southampton, UK


What is the final decision then? I mean, if I use ubuntu, should I have
to download the RAR addon through synaptic? And then just uncompressing
the first part, I would be able to combine all of the parts?


Sorry to interrupt, the package you need to install via Synaptic Manager is
'unrar' not the one 'rar'. 'rar' can compress files in to a RAR acchive but
cannot uncompress and its a non-free shareware. After 40 days, you need to
register to continue using 'rar'. And 'unrar' has no limit.

lol ... not really. It probably fails under windows ... but under linux, it picks up the first file by itself. So ... its going to do it 10 times for 10 parts. Try it ... its going to ask you if you want to overwrite the file(s) 9 times :).

@Hafiz: if youre more comfortable with nautilus, then you should just use the extension ... i find it faster to work with on the command line :).

tsiraj@morrison: ~/tmp_rar $ unrar x 9761.part2.rar

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal


Extracting from 9761.part2.rar


Extracting from 9761.part1.rar

Extracting  test1.exe

Extracting from 9761.part2.rar

...         test1.exe

Extracting from 9761.part3.rar

...         test1.exe      OK
Extracting  test2.exe

Extracting from 9761.part4.rar

...         test2.exe

Extracting from 9761.part5.rar

...         test2.exe

Extracting from 9761.part6.rar

...         test2.exe  OK
All OK
Return code: 0



Regards,
Tareq Ahmed Siraj


0 comments:

Other Blog Posts by Maintainer

ICT News of Bangladesh

Linux Lews - Power by Google