Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have many 7zip Archive with same password. When I extract it, both using GUI application and command line, I must enter same password again and again. When I read the 7za command manual pages, I just found how to specify the password to add an archive, not to extract it. 7za command need us to manually type the password. Is there any way to do it automatically?

share|improve this question
Do you mean that 7za e -p mypassword ... doesn't work? – maaartinus Mar 5 '11 at 23:32
@maaartinus That won't work as the syntax is 7z e -p{mypassword} – Octavian Damiean Mar 5 '11 at 23:33

1 Answer 1

up vote 3 down vote accepted

Yes there is.

You can write a shell script to do that.


for archive in *.7z
  echo "Extracting $archive"
  7z e -p{$PASSWORD} $archive

This will simply extract every .7z archive in the current directory using your password.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.