Linux

7zip CLI to Generate sha256 Checksum File


On Windows you have a nice option to right click on a file and have 7zip generate a sha256 file that sits next to the file. I wanted to script up a linux file server to go through and find all iso files and place the sha256 hash next to it. As you can see from the menu, its not the easiest thing to get to.

But with this script you can just say (view sourcecode)

7zsha256 *.iso

And it will run through all the iso files in the folder and place the sha256 file next to it. If a sha256 file already exists, it will just skip that file and keep going since they take a while to generate.

To Install

curl -o 7zsha256 https://raw.githubusercontent.com/szazeski/helpers/main/7zsha256 && chmod +x 7zsha256

Or git clone the whole repo for more helpers

git clone https://github.com/szazeski/helpers.git

List All sha256

Now after you have generate sha256 files, this can list out all of the sha256 in one view.

find . -name "*.sha256" -exec cat {} +

openanalytics 23619 views

I'm a 34 year old UIUC Computer Engineer building mobile apps, websites and hardware integrations with an interest in 3D printing, biotechnology and Arduinos.

View Comments
There are currently no comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.