Skip to content

Instantly share code, notes, and snippets.

@ArneAnka
Created April 10, 2017 20:01
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 ArneAnka/f245043a1fd2a29c68cb4f71b78203c7 to your computer and use it in GitHub Desktop.
Save ArneAnka/f245043a1fd2a29c68cb4f71b78203c7 to your computer and use it in GitHub Desktop.
Extract rar files recursively and remove the rar files afterwards
# Assuming extglob option of bash is set, which is the default, otherwise set with shopt -s extglob
# http://askubuntu.com/a/903235/562529
`find . -name '*.rar' -exec unrar e {} \; -exec rm {} \; && rm *.r+([[:digit:]])`
# Maybe better option?
find . -name '*.rar' -exec unrar e {} \; -exec rm {} \; && rm *.r*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment