Monthly Archives: September 2006

unraring multiple subdirectories

I recently aquired the Futuram season 1-4 collection.
The folder structure was:
Season #
–Show number #
—-multi file rar archive

I really didn’t want to have to uncompress each episode individually, since there are (4 seasons x 12 episodes = 48) lots of shows. Very tedious.
So I set out to write a script to do this for me.

for dir in *; do for filename in *.rar; do unrar x $dir/$filename ../; done; done

May also be usefull:
find -type f -name '*.rar' -execdir unrar x {} \;