Linux Mac

Use .rev files from the command line

Sometimes, when you download a big multi-part rar file, a part gets corrupted, or it is not even available. Often, however, .rev files are made available, and they’ll let you extract the file even with missing/corrupted parts. In fact, they let you re-create these parts, in a way similar to RAID-5/6 for hard disks.

Rar files

You can use the command line rar tool to do all the job. First, head over to rarlab, the official site, and download the appropriate version for your OS.

On Linux and OS X, you might want to move the binaries into your path, for example into /usr/bin.

Then, cd into the directory where your parts reside (together with .rev files, you need one for each damaged part you wish to recover), and launch:

rar rc yourfile-part01.rar

The rc switch tells rar to ReConstruct any missing parts (I’d advise you to move somewhere else or delete any damaged parts). Point it to part number 1, it’ll figure out the rest. The process can be quite long, more so for big archives, but it’s worth waiting. After it’s done, you can extract your files as usual, or directly using the command line:

rar x yourfile-part01.rar

12 replies on “Use .rev files from the command line”

This is awesome! I had been looking at how to use .rev files on a Mac for a long time. Thanks!!!

Would you be so kind as to show or explain how I could use automator to extract a .rar via the terminal and save it to the current directory via a contextual menu option? Also if possible use .rev files to recreate a missing .rar part and have it also executed from the contextual menu? I have the command line rar files installed but would like to automate it a little to save some time opening the terminal, adding file path etc. Thank you!

Hi Warrent,
I’m afraid I don’t know how to do that with Automator 🙁

I just mentioned automator but if you know of another way please let me know 🙂

Hi there,
I would appreciate more guidance with this method. I have an archive with 94 rar segments and 9 rev files. Two of the rar segments are partially incomplete. Attempting to expand the rar file results in an incomplete archive as expected. However, running the rc command in the terminal, I can see all 94 files are processed (2 list as “Unexpected end of archive” as expected), 9 recovery volumes are found but the text output is “0 volumes missing – Nothing to reconstruct” and no repair takes places. Any idea what I’m doing wrong? I’m happy to send screenshots by email and keen to get this working.

Actually, disregard my previous request for assistance – I just figured it out! I needed to remove the 2 partially complete .rar segments from the folder and then the rc command re-created these pieces. Happy to report a successful result! Thanks for the post on using the rc command – I haven’t seen this posted anywhere else for OS X users.

Open Terminal, type “rar rc “, no quotes but mind the space after the d, then drag the first part of the rar file, and press enter.
The process will take a while but when it’s done you’ll have the missing part(s) reconstructed, which you can then extract as usual.

‘… type “war rc “…’ should be ‘… type “rar rc “…’.

I know I’m being pedantic, but so is Terminal 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.