3

I have the following requirement:

  1. Calculate one checksum (SHA1 preferred) from an entire folder. This has to be done on Windows.
  2. Move this folder from a Windows to a Linux box.
  3. Verify the entire folder against the hash value on the Linux box.

Any ideas are welcome!

5
  • How is this "move" done? Reason I am asking is: If the folder is zipped, or tarred or jarred or whatever, then the problem boils down to compute the checksum of the archive.
    – Ingo
    Commented Mar 22, 2011 at 17:10
  • What needs to be counted? Just file names/contents? Permissions? Timestamps? ACLs? There are quite a few options, many of which will make for a much more difficult task (e.g. timestamps).
    – Jonathan
    Commented Mar 22, 2011 at 17:42
  • I want to make sure all files are transfered and that they have the same contents. Zipping or taring the files is an option if it doesn't make the process much more time consuming.
    – BetaRide
    Commented Mar 22, 2011 at 18:36
  • Then tar it, checksum that, transfer it and verify the checksum. If you don't trust tar or your filesystem to maintain the integrity, you've got your work cut out for you.
    – Ilkka
    Commented Mar 22, 2011 at 19:13
  • FYI File integrity checker for Windows Commented May 29, 2017 at 21:30

1 Answer 1

2

md5deep http://linhost.info/2010/02/checksum-a-directory-with-md5deep/

It's done using MD5, but allows you to calculate hashes for sub-directories and is supposedly cross-platform. It would not surprise me if there was a SHA version out there.

Alternate solution would be to do the transfer with rsync over SSH (install Cygwin on the Windows box). Which will make sure that the destination matches the source.

1
  • md5deep.sourceforge.net "The programs are distributed as binaries for Microsoft Windows (7, Vista, XP, 2003, and 2000 are supported) and as source code. The source code should compile nicely on just about any platform, including Cygwin, Linux, FreeBSD, OpenBSD, Mac OS X, OpenSolaris, HP/UX, etc. Commented May 29, 2017 at 21:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.