unrar folder with password (terminal)

i'm using this command to unrar folders:

for file in *.part01.rar; do unrar x ${file}; done;

but i don't know where to add the password in this command. because right now, this command wants the password for every archive in that folder.

thanks

2 Answers

From man unrar:

-p<password> Set password.

So your line would be something like:

for file in *.part01.rar; do unrar x -p<password> ${file}; done;
1

I only unrar the first part (when there are part01.rar, part02.rar, etc.) and it goes itself for the rest of the files.

unrar x An_Awesome_Movie.part01.rar -ppassword
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like