Command line MD5 Hash calculator for Windows 7, Vista and XP

Continuing to my pervious article MD5 Checksum on Linux - How to ? . What if you want to calculate same MD5 has for a windows machine?

None of the Windows versions including Win7 , Vista or XP come with such tool to calculate MD5 hash for files. I have developed a small MD5 hash calculator named (MD5Sum) which you can use to calculate MD5 on windows machines. To use this utility, simply copy it to OS folder  which is usually “c:\windows” and execute below on command prompt.

image

MD5Sum myfile.zip

or in case the file exists in some other location

MD5Sum c:\mydata\xyz\myfile.zip

Download MD5Sum for Windows

MD5 Checksum on Linux - How to ?

For people who don’t know what is MD5? and why we use it?

As per Wikipedia

The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. Specified in RFC 1321, MD5 has been employed in a wide variety of security applications, and is also commonly used to check data integrity.

To calculate MD5 hash you can use md5sum command something like below.

MD5 Checksum

md5sum filename

This command returns 128 bit checksum string which you can further compare to validate the authenticity of the file/ software you have downloaded.

Unix /Linux Command to display first n lines and last n lines of a files

If you are new to dark world of penguins where command line matters a lot, these two commands are going to be very handy to you

Read first n lines from a files :

head –10  install.log

This command will display first 10 lines of install.log files. In a similar manner, if you want to read a file from bottom, you can use tail command.

Read last n lines from a files

tail –5 install.log

tail command will output 5 lines from the bottom of install.log file.

Both commands can also be used at the same time to get some more interesting output. Lets say, I want to read 3 lines starting from 100. This can be interpreted as below command sequence

head –100 | nl | tail –3

This will result output similar in the stated problem. nl parameter in the command is used to print lines numbers, this can be omitted if you don’t want them.