I'm looking for a way to decompress multiple rar files with a single command. Hopefully each file would be unrared into dir with same name as archive. I normally just do this manually, but sometimes I'm The currently available source from www. RedHat Commands. OpenSolaris Commands. Linux Commands.
SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Forum Rules. Mark Forums Read. Thread Tools. It doesn't happen often only seen it once or twice in years , but I don't want to risk losing a huge chunk of data because I didn't want to have to write a script to confirm that it extracted properly — Jeremy.
Add a comment. Active Oldest Votes. A friend of mine has been working on a bash shell script to do this which is on github here. Improve this answer. Dan Dan. It does not yet check the extracted files or delete the archives :! This is done using the "find" command. Notes on unrar flags for anyone reading the script: "-y" means "answer yes to all questions" and "-o-" means "do not overwrite existing files when decompressing" — Jeremy.
Ok, so it turns out that unrar has a return code, which will at least tell me if all of the parts of the rar were present, and a file was extracted from them, if not getting me to the md5sum stage. Sign up or log in Sign up using Google. Here is a shell script to loop through files in a directory. You can use it as a template to build your own script to perform any kind of operations as per your requirement. This allows us to use the script for any folder location on our system.
Then we will loop through it using for.. Works like a charm now! Thank you for the help! If there is only one file, you can use the -d option.
AdminBee Can be installed on macos too brew install unar — bastien enjalbert. Martin Andersen Martin Andersen 1. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog.
0コメント