How to verify sha256sum for multiple file or one file.

2015-10-30 120 words 1 min read

So, lets say you have downloaded the SHA256SUMS files. This file contains the sha256sum for multiple files and you want to compare the values for only one or some of them, then the simplest thing you can do is:

sha256sum -c SHA256SUMS

Now, with this if you do not have some files present then you might get some errors and if you do not want that, then you can try this:

grep <filename> SHA256SUMS|tee /proc/self/fd/2|sha256sum --check -

And now if you have some files under some subdirectories as well and you want to generate the SHA256SUMS file, then the simplest is to use this:

sha256sum $(find . -type f -exec echo {} \+ )
###OR
sha256sum $(find . -type f)

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it