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
Categories
Mac

Some useful Alfred 2 workflows

Today I finally bought Alfred 2, a really nice update. It’s great, but I had to recreate some scripts I got used to while using version 1. You can find them below.

Alfred

 

CopyPath

CopyPath copies the path of the currently selected Finder Item to the clipboard. Just launch Alfred and type “path”. Also, thanks to Joachim’s suggestion, you can now set a keyboard shortcut to trigger the workflow without needing to ever launch Alfred.

Copy IP

Copy IP your current local IP, either Wi-Fi or Ethernet. It includes 3 commands:

  • ethip copies your Ethernet IP
  • wifiip copies your Wi-Fi IP
  • ip [interface] copies interfaces IP. It’s meant for power users. Note: on Macs usually en0 is the Ethernet interface, while en1 is Wi-Fi.

RevMove

RevMove checks your clipboard contents and removes any line containing “.rev”. It is useful if you download from file-hosting sites, such as Netload, because uploaders often include .rev files to their upload to be able to extract your files also some parts were corrupted/not available. But when everything works as it should, these files are pointless and waste time and bandwidth to be download.

MAS Search

MAS Search lets you search for an app in the Mac App Store. Just type mas followed by your search terms.

 

If these are not enough, you can find many, many more in the Alfred 2 Workflow list, which also features my very own CopyPath.