What tool can generate MD5 from the command-line?

14

3

Is there any tool that can automate by script to generate file MD5?

I used to use Cygwin but I am looking for another solution without having Cygwin installed.

Stan

Posted 2010-05-12T12:41:04.570

Reputation: 6 535

Question was closed 2014-07-31T14:17:11.983

Answers

13

The hashutils package has an md5sum.exe utility. It simply uses Microsoft's Crypto APIs and will leave you I/O bound, which isn't necessarily the case with other tools. For example, I've benchmarked the md5sum from UnxUtils against this one and UnxUtils is significantly slower. I bet CygWin would be even worse. The author also wrote the excellent HashCheck, a shell extension for hash generation & verification.

afrazier

Posted 2010-05-12T12:41:04.570

Reputation: 21 316

1@RaduMurzea Classpath?! That's Java not Windows. Were you born after java or something?! It's called a PATH – barlop – 2014-08-29T18:08:35.347

@barlop OK fine, my bad. I hadn't come across them in a while and forgot which is which :) . – Radu Murzea – 2014-08-29T19:30:31.390

2PS: Given how old Java is, it's not that unreasonable to think that it's older than me :D . – Radu Murzea – 2014-08-29T19:39:34.847

2+1 That hashutils thing is awesome. If you also put it in the classpath, it's even more awesome :D . Thanks. – Radu Murzea – 2013-02-05T17:29:34.290

4

md5sum is included in the coreutils package of GnuWin32.

GnuWin provides ports of tools with a GNU or similar open source license, to modern MS-Windows (Microsoft Windows 2000 / XP / 2003 / Vista / 2008 / 7)

Mike Fitzpatrick

Posted 2010-05-12T12:41:04.570

Reputation: 15 062

4

Check out MS Support - Availability and description of the File Checksum Integrity Verifier utility:

The File Checksum Integrity Verifier (FCIV) is a command-prompt utility that computes and verifies cryptographic hash values of files. FCIV can compute MD5 or SHA-1 cryptographic hash values. These values can be displayed on the screen or saved in an XML file database for later use and verification.

Ignacio Vazquez-Abrams

Posted 2010-05-12T12:41:04.570

Reputation: 100 516

2

Use MD5Sums. See the options it has.

MD5sums 1.2 freeware for Win9x/ME/NT/2000/XP+
Copyright (C) 2001-2005 Jem Berkes - http://www.pc-tools.net/

Usage: md5sums.exe [OPTION] filespec1 [filespec2 ...]

OPTION switches:
-B  Base64 encoded output, instead of default hex format
-b  Bare output, no path headers
-e  Exit immediately; don't pause before returning
-n  No percent done indicator
-p  Pause before returning (incompatible with -e)
-s  Display statistics at end (hashing speed)
-u  Mimic output of UNIX md5 command (implies -b, -n)

Examples:
md5sums c:\temp
md5sums original.doc copy*.doc backup*.doc
md5sums -n -e d:\incoming > log

ukanth

Posted 2010-05-12T12:41:04.570

Reputation: 9 930

1

ExactFile

ExactFile is a file integrity verification tool:

  • Use it to make sure files copied to CD-ROM are bit-perfect copies,
  • Use it to make sure backups copied from one drive to another are just right,
  • Use it to make sure files haven’t been changed or damaged over time.

Multi-threaded, so your extra CPU cores get used when scanning multiple files and work gets done faster.

Happy with Unicode file names, so it doesn’t fail when you’re using it on files named in Japanese, Hebrew, Chinese, or any other language.

Supports multiple checksum routines (hashes), like MD5, SHA1, CRC32, RIPEMD and others.

Supports recursive directory scanning.

Supports Very Big Files — If it’s on your hard drive, ExactFile can handle it.

Does everything popular file summer utilities do, like fsum, md5sum, sha1sum, sfv, etc, but better!

Compatible with popular file checksum digest formats.

For Windows 2000, XP, Vista, and 7.

GUI. Easy to use to get checksums for individual files, create checksum digests, and test checksum digests. Does not require the console version or any external DLLs.

FREE.

Daed

Posted 2010-05-12T12:41:04.570

Reputation: 51