69

Is there a way to extract all RAR files using unrar.exe via the command line without passing it each part?

I have lots of multipart RAR files in mixed formats: .part1.rar, .part2.rar or .rar, .r00, .r01, etc.

Is there a trick I'm missing or this is something only possible from WinRAR (where you just right click Extract and it knows to extract from the other parts as well)?

Hennes
  • 64,768
  • 7
  • 111
  • 168

2 Answers2

80

I've had this very problem before and here is the answer.

unrar x filename.part1.rar
slhck
  • 223,558
  • 70
  • 607
  • 592
jayd189
  • 801
  • 6
  • 3
  • If the archive contains a file foo in the directory bar it will be extracted like that under SUSE. Under Red Hat it will become a file called bar/foo for a pity. – Thorsten Staerk Oct 09 '15 at 12:58
15

I know this is an old question, but I did it with just the following command, using UNRAR 4.10 freeware

unrar e filename.rar

This handled the multiparts just fine.

  • 8
    Strangley, in Debian, the unrar package was able to extract my multi-part rars, but the unrar-free was not. This is a bit confusing, because running the unrar command from the unrar package (which is supposedly not free) states that it is UNRAR 4.10 freeware as you mentioned. Thank you, I have been unable to get this working for quite some time. – bhinesley May 21 '13 at 04:57
  • 2
    To follow up, in Debian, if you don't see a package called 'unrar', make sure you're including contrib and non-free in your apt sources. Unrar is a non-free package. – Jeff Welling Oct 12 '13 at 20:16
  • 6
    You can use the free (as in freedom) unar too as foolows; `unar filename.rar` – aairey Mar 10 '16 at 20:42
  • unar doesn't work for me with split archives (on arch) at all, only unrar does. (7zr too doesn't) – Phani Rithvij Feb 19 '23 at 05:55