Skip to content

Instantly share code, notes, and snippets.

@arvidkahl
Created February 21, 2012 13:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvidkahl/1876665 to your computer and use it in GitHub Desktop.
Save arvidkahl/1876665 to your computer and use it in GitHub Desktop.
recursive unrar script (with rm) that keeps directory structure intact
#!/bin/bash
for f in `find . -type f -name "*.rar"`
do
echo "Unpacking " $f " into " `dirname $f`
unrar x -y $f `dirname $f`
rm $f
done
@arvidkahl
Copy link
Author

This works on an OSX machine with unrar binaries from http://www.rarlab.com/download.htm
To be used from within the directory that contains all the archives that need to be expanded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment