CLI Unrar Multiple Directories

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
This is not TrueNAS specific, but a command-line question that I could use a hand on.
I've got a downloaded folder containing multiple folders full of rar files. (EDIT: I do have unrar installed) I first began decompressing them one folder at a time, in CLI, then realized it would take hours. So I googled and found a page offering instruction to decompress multiple subdirectories in one command:


It recommends running the following command from the top directory:

Code:
unrar e -r *.rar

I get a no match error. If I instead run
Code:
unrar e -r

(without *.rar) I get "no files to extract"

Is anyone familiar with this technique and what the above code is missing?
Thanks[/code]
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The unrar binary isn't installed in TrueNAS, which is why you're getting that error, assuming you're trying to run that command on TrueNAS. You should be able to create a jail and install it there, though.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
Yes, I've installed unrar and used it on individual files. Trying to figure out this batch.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
Ok, I've figured it out. It wanted to be recursive, but I had to tell it WHERE to recurse from. Adding the top directory name fixed the issue. This took two hours to solve, but hopefully makes life easier when I encounter this again.

Code:
unrar e -r -o- /TOP.FILE.FOLDER
 
Top