Skip to main content
1 of 2
Lri
  • 106.4k
  • 19
  • 230
  • 283

I use unar, which is a command line version of The Unarchiver.

These also work with paths that contain spaces:

find . \( -name \*.rar -o -name '*.r[0-9][0-9]' \) -print0 | xargs -0 unar
find . -name '*.r[a0-9][r0-9]' -exec unar {} \+
find . -name '*.r*' -delete

Or if you install Bash 4 and add shopt -s globstar to ~/.bash_profile:

unar **/*.r*
shopt -s extglob; printf %s\\n **/*.@(rar|r[0-9][0-9])
rm **/*.r[a0-9][r0-9]
Lri
  • 106.4k
  • 19
  • 230
  • 283