Batch extract a directory full of split RAR archives “part1″, “part2″

If for some reason you have a directory full of archives, and each is into parts, extracting them individually can be a pain. If you just type “ *” into the terminal, you will each file multiple times depending on how many “parts” it has. First, install the “” package:

sudo aptitude install unrar

then cd to the directory with all of your RAR archives. Then type:

unrar e '*..rar'

make sure to keep the single quotes.
If the rar is password protected, add the “-p” switch followed by the password without any spaces.

unrar e -p
 '*.part1.rar'
    • Bruno Freitas
    • September 5th, 2011

    Uow! Thanks man!! Many other people make non-easy scripts!! Your solution is simple, very simple.

    Thanks.

    • enolive
    • November 28th, 2011

    thanks +1

    this saves a lot work when extracting tons of stuff from a file hosting service

  1. No trackbacks yet.