Linux shell gets the command for file MD5

Source: Internet
Author: User
Tags hash md5


Gets the MD5 value of the file:

$ md5sum linuxmint-12-gnome-dvd-32bit.iso|cut-d '-f1

The resulting MD5 value

Ee3d6e2ca498bc7685b7f17cdb5f2eea

Use MD5 to verify ISO files:

$ md5sum Linuxmint-12-gnome-dvd-32bit.iso >linuxmint-12-gnome-dvd-32bit.md5

Note that the contents of the LINUXMINT-12-GNOME-DVD-32BIT.MD5 are:

Ef3d6e2ca498bc7685b7f17cdb5f2eea Linuxmint-12-gnome-dvd-32bit.iso

Put linuxmint-12-gnome-dvd-32bit and its validation files
Linuxmint-12-gnome-dvd-32bit.md5 placed in the same directory with the following command:
$ md5sum-c LINUXMINT-12-GNOME-DVD-32BIT.MD5

Output if the checksum is correct:

Linuxmint-12-gnome-dvd-32bit.iso: OK

If the checksum error is output:

Linuxmint-12-gnome-dvd-32bit.iso: Failure
md5sum: Warning: 1/1 generated checksum mismatch
Command explanation:
Md5-c: Read the MD5 checksum from the file and check it

Message Digest algorithm MD5 is a hash function widely used in the field of computer security to provide integrity protection for messages. The algorithm's file number is RFC 1321 (R.rivest,mit Laboratory for Computer Science and RSA Data Security Inc. April 1992)
Keywords:hash,sha,ronald L. RIVEST,MD5,IETF (Internet Engineering Task Force)

MD5 to retrieve all files of a directory

Dir= '/home/fukun '
Find $DIR-type f-print0 | xargs-0 md5sum >/md5.md5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.