How to check md5sum between two directories?
5,445
first get md5sum
of directory1 all files and write to a file.
find dir1 -type f -exec md5sum '{}' + >dir1_checksum.txt
Then find all directory2 files checksum and output those checksums didn't match using grep -vf filename
.
find dir2 -type f -exec md5sum '{}' + | grep -vf dir1_checksum.txt
Related videos on Youtube
Author by
Pandya chinna
Updated on September 18, 2022Comments
-
Pandya chinna over 1 year
I have two directories. I want to check whether all files in one directory are same as that of other directory or not by using
md5sum
. If themd5sum
results in a difference, I want to applydiff
.So how to check
md5sum
and find out whether MD5 values are same or not?