Linux command md5sum in plain language

Linux command md5sum in plain language

md5sum hoge.txt will return a hash value.

[root@humidai]# md5sum hoge.txt
0bee89b07a248e27c83fc3d5951213c1 hoge.txt

You can see that the hash value in the a.txt file is returned.

This hash value is calculated from a calculation algorithm called MD5.

Where to use md5sum

The md5sum command is used to calculate hash values from files and strings.

One use of this is to use md5sum to make sure that the files placed in each environment are the same files.

For example, suppose you have development environments named dev, test, and prod.

  • hoge-1.0.0.jar in dev environment
  • hoge-1.0.0.jar in test environment
  • hoge-1.0.0.jar in prod environment

To verify that these files are the same, we can use md5sum to determine that if the hash values are the same, then they are the same file.

[root@dev]# md5sum hoge-1.0.0.jar
a850e5a11bc67acdf0ac2239c4ec79b2 hoge-1.0.0.jar
[root@test]# md5sum hoge-1.0.0.jar
a850e5a11bc67acdf0ac2239c4ec79b2 hoge-1.0.0.jar

コメント

Discover more from 株式会社CONFRAGE ITソリューション事業部

Subscribe now to keep reading and get access to the full archive.

Continue reading

Copied title and URL