Using Terminal to create md5 of folders & subfolders?

Discussion in 'macOS' started by kkamin, Jun 23, 2010.

  1. kkamin macrumors member

    Joined:
    Mar 24, 2009
    #1
    I can't find a third party app to create a MD5 checksum of folders and subfolders. The closest I got was checksum+, but the programs doesn't handle large folders; it freezes.

    So I would like to go into Terminal and do it manually. Can someone share the command line to create:

    •a MD5 checksum of a folder and its subfolders and output it to a txt file.

    •a way then to use that outputted text file for file verification. My initial thinking is that I would have to create another MD5 checksum of the copied folder and then use a difference type command to compare the text files?

    Thanks for reading. Any help is appreciated.
     
  2. ianray macrumors 6502

    Joined:
    Jun 22, 2010
    Location:
    @
    #2
    Something like this?

    Code:
    find . -type f -print0 | xargs -0 md5 > before
    # later...
    find . -type f -print0 | xargs -0 md5 > after
    diff before after
    
     

Share This Page