I'm having some difficulty using md5sum to verify some copied files.
I have two directories: dir1 and dir2. In dir1 there are five files: file1, file2, file3, file4 and file5. dir2 is empty.
If I do: cp dir1/* dir2,
then: md5sum dir1/* > checksums,
then: md5sum -c checksums,
the result is:
dir1/file1: OK
dir1/file2: OK
dir1/file3: OK
dir1/file4: OK
dir1/file5: OK
But this is no good. I want it to compare the checksums in the text file with the checksums of the copied files in dir2.