Creating an encrypted store-only archive seems to be possible through the GUI variants that delegate to 7zip, but I can't figure out the proper command line call.

My failed attempts result in E_INVALIDARG:

7za a ~/Desktop/tmp.7z my-big-file -em=AES256 -pMyPass -m0=Copy
  • In Ubuntu man 7za shows the zip file name and the file list as coming after the options. – AFH Mar 15 '17 at 15:42
  • 1
    Just FYI... here's an answer with a 7z and 7za general comparison.: superuser.com/questions/1105516/comparing-7z-exe-and-7za-exe/…. Try it as....7za a -mhe=on -pMyPass ~/Desktop/tmp.7z my-big-file and then check to confirm it's 256 bit AES encrypted: linux.die.net/man/1/7za – Pimp Juice IT Mar 15 '17 at 16:16
  • What did you determine with this @JackWade? – Pimp Juice IT Apr 28 '17 at 1:10
  • @PimpJuiceIT 7za a -p -tzip -mem=AES256 -mm=Copy -mx=0 -mmt=12 ~/Desktop/fooBar.zip ~/Desktop/FooFolder – Jack Wade Jun 28 at 17:31

I've just had to deal with this myself, I didn't find the manual to be perfectly clear on how to use Method Parameters.

Encryption Type is a Method Parameter and needs to be passed as part of an -m switch, e.g.: -mem=AES256.

Similarly, if you want to do Copy Only (no compression), you need to use -mx=0.

7za a ~/Desktop/tmp.7z my-big-file -mem=AES256 -mx=0 -pMyPass
  • And does this command (with the options after the filenames) actually work? – G-Man Oct 31 '17 at 22:35
  • Works for me just fine on Windows, I imagine it would work in iOS/Unix. – Zac Faragher Oct 31 '17 at 22:49

I used 7z a -t7z -m0=Copy -mhe=on -pPassword archive.7z foldername to get around the E_INVALIDARG error.

Your Answer

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

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