Menu

7z h sha256?

Help
2014-12-18
2017-01-22
  • Sami Lehtinen

    Sami Lehtinen - 2014-12-18

    I'm not getting any error, yet I'm not getting the results I expect either. What I'm doing wrong and what's the right syntax. - Thank you!

    ̃̃̃̃$ 7z h -mm=sha256 *.txt
    
    7-Zip [64] 9.35 beta  Copyright (c) 1999-2014 Igor Pavlov  2014-12-07
    Scanning
    
    CRC32             Size  Name
    -------- -------------  ------------
    CDF68C0E         40158  History.txt
    FDDB6E75          1927  License.txt
    7ED55530          1683  readme.txt
    -------- -------------  ------------
    4AA74FB3         43768
    
    Files: 3
    Size: 43768
    
    CRC32  for data:              4AA74FB3
    CRC32  for data and names:    2F50438F
    
     
  • Igor Pavlov

    Igor Pavlov - 2014-12-18

    -scrcsha256

    you can read help about h command:

    Some hints about switches:
    -m sends setting to 7z.dll (archive handlers)
    -s sets setting in 7z.exe.

     

    Last edit: Igor Pavlov 2014-12-18
    • Sami Lehtinen

      Sami Lehtinen - 2014-12-18

      +1 Thank you!

       
      • Nemo

        Nemo - 2015-12-18

        And thanks Sami for your blog post where I found about the feature: http://www.sami-lehtinen.net/blog/using-7-zip-hashing-to-compare-directories-and-files

        Also useful: http://7zip.bugaco.com/7zip/7zip_15_09/MANUAL/cmdline/commands/hash.htm

        To easily use the hashes later in sha256sum -c, I only need to remove the size information, for instance with sed: 7z h -scrcsha256 mydir/* | sed --regexp-extended 's, +[0-9]+ +, ,g' > mydir.sha256sum ; sha256sum -c mydir.sha256sum (tested with p7zip Version 15.09 beta).

        Is there a way to use the -scrc parameter also in "7z a"? I tried 7z a -scrcsha1 but 7z l -slt still output CRC only, like

        Path = filename
        Size = 8548096
        Packed Size =
        Modified = 2015-12-03 14:20:20
        Attributes = A_ -rw-r--r--
        CRC = B2F761E3
        Encrypted = -
        Method = LZMA2:24
        Block = 0
        
         

        Last edit: Nemo 2015-12-18
  • Fadi R

    Fadi R - 2017-01-21

    My god, I love this project.

     

Log in to post a comment.