Created
May 30, 2012 06:52
-
-
Save Thermionix/2834154 to your computer and use it in GitHub Desktop.
recursively check or generate md5 checksums for a folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ../iso/ | |
for f in `find . -type f -not -name "*.md5" -printf "%f\n"` | |
do | |
if [ -f ${f}.md5 ] | |
then | |
md5sum -c $f.md5 | |
#| grep FAILED$ > failed_hashes | |
#diff <( cat $f.md5 ) <( md5sum $f ) | |
else | |
md5sum $f > $f.md5 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment