Advertisement
peetaur

md5 checksums to recursively compare directories

Aug 9th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. # md5 checksums to recursively compare directories
  2.  
  3. # change to the directory so your sums file will not include the file name, in case it is different on the other machine
  4. cd dirwithfiles
  5. # build the checksums file
  6. find . -type f -exec md5sum {} \; > ~/checksums.txt
  7.  
  8. #then transfer it to other machine:
  9. scp ~/checksums.txt user@somewhereelse:
  10.  
  11. # then on other machine:
  12. cd dirwithfiles
  13. md5sum --quiet -c ~/checksums.txt > ~/badfiles.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement