Created
April 10, 2017 20:01
-
-
Save ArneAnka/f245043a1fd2a29c68cb4f71b78203c7 to your computer and use it in GitHub Desktop.
Extract rar files recursively and remove the rar files afterwards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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