Rodrigo
Rodrigo

Reputation: 5139

Checking md5 without looking character by character

Every time I have to check md5 sums I issue the proper command, and then check character by character to see if they're the same. I think this is far from ideal, the ideal would be to add an option to the command line, including the expected checksum, and then the program itself would tell me if they're the same or not.

In Debian, I'm using md5sum, but I don't see this option in its manual. Does this option exists there, or should I use a different software?

Upvotes: 0

Views: 55

Answers (1)

Oliver Charlesworth
Oliver Charlesworth

Reputation: 272762

As described by Wikipedia:

echo 1e77e1c65187884ba79a3bd06b02fc29 my.iso | md5sum -c

When md5sum is given the -c flag, it processes a file containing a list of expected hashes and filenames. If no file is provided, then it reads these from stdin.

Upvotes: 2

Related Questions