Skip to content

Instantly share code, notes, and snippets.

@rssnyder
Created February 7, 2019 00:22
Show Gist options
  • Save rssnyder/2b94fc75f541a7a54ef1b7b3011976b9 to your computer and use it in GitHub Desktop.
Save rssnyder/2b94fc75f541a7a54ef1b7b3011976b9 to your computer and use it in GitHub Desktop.
Finds .rar part files, combines, and deletes the part files after completion.
#!/bin/bash
find . -name "*.rar" -execdir unrar e -o- "{}" \;
find . -type f -name "*.rar" -delete
find . -type f -name "*.r[0-9][0-9]" -delete
find . -name "*[sS]ample*" -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment