Skip to content

Instantly share code, notes, and snippets.

@richardtape
Created May 14, 2014 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardtape/c49f0711649026795f27 to your computer and use it in GitHub Desktop.
Save richardtape/c49f0711649026795f27 to your computer and use it in GitHub Desktop.
Batch unrar from the command line in Mac OS X
# You'll need to install unrar. See: http://gotofritz.net/blog/tutorials/batch-unrar-command-line-os-x/
# Blog post: http://richardtape.com/?p=291
unrarall(){
# Get our present working directory
iamhere=`pwd`
# find all rars recursively above where we are
find "$iamhere" -name "*.rar" -exec unrar -y -ad x {} \;
# display a notification in notification centre when we're done
osascript -e 'display notification "Hooray! UnRar procedure finished successfully. Champion." with title "Unrar finished"'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment