How do I create a store-only AES256 7zip archive from linux/macOS command line?












2















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









share|improve this question























  • 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
















2















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









share|improve this question























  • 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














2












2








2


1






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









share|improve this question














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






linux command-line 7-zip






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 15 '17 at 15:25









Jack WadeJack Wade

1111




1111













  • 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



















  • 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

















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





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




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





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





What did you determine with this @JackWade?

– Pimp Juice IT
Apr 28 '17 at 1:10










2 Answers
2






active

oldest

votes


















1














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





share|improve this answer


























  • 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



















0














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






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1188987%2fhow-do-i-create-a-store-only-aes256-7zip-archive-from-linux-macos-command-line%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    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





    share|improve this answer


























    • 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
















    1














    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





    share|improve this answer


























    • 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














    1












    1








    1







    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





    share|improve this answer















    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






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Oct 31 '17 at 22:51

























    answered Oct 31 '17 at 22:26









    Zac FaragherZac Faragher

    1114




    1114













    • 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



















    • 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

















    And does this command (with the options after the filenames) actually work?

    – G-Man
    Oct 31 '17 at 22:35





    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





    Works for me just fine on Windows, I imagine it would work in iOS/Unix.

    – Zac Faragher
    Oct 31 '17 at 22:49













    0














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






    share|improve this answer




























      0














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






      share|improve this answer


























        0












        0








        0







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






        share|improve this answer













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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 25 at 10:07









        user3248784user3248784

        213




        213






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1188987%2fhow-do-i-create-a-store-only-aes256-7zip-archive-from-linux-macos-command-line%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix