Sample Header Ad - 728x90

verify sha1sum and print directory & filename of corrupt files

0 votes
3 answers
459 views
I have a series of directories with sha1sums and md5sums files in. The format of these files is the usual hash space space filename, with one hash/file per line. I want to verify the files and print out the path as well as the filename of corrupt files.
find . -name SHA1SUMS -execdir echo "$PWD" sha1sum --quiet --check SHA1SUMS \; > logfile
(modified from here ) gives
./path1/SHA1SUMS
sda2.ntfs-ptcl-img.gz.aa: FAILED
blkdev.list: FAILED
Info-dmi.txt: FAILED
./path2/SHA1SUMS
Whereas I am looking more for a
./path1/sda2.ntfs-ptcl-img.gz.aa: FAILED
./path1/blkdev.list: FAILED
./path2/file: FAILED
type of output.
Asked by luusac (3 rep)
Oct 14, 2020, 05:08 PM
Last activity: Oct 15, 2020, 08:50 AM