Categories
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