Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I frequently verify the file integrity on my OpenWrt router by hashing the files. I didn't want to use sha256sum, so I decided to use the faster md5sum. Is there anything even faster available?

share|improve this question
Quick question - why do you need to regularly check file integrity? It sounds like there may be a wider issue that is worth solving? – Rory Alsop Nov 11 '11 at 10:37
Are you concerned with accidental damage, truncated files, or potentially malicious attackers? If the latter, you're not going to do much better at this level, but there's quite probably a better way of achieving your overall security goal. So what are you trying to do? – Gilles Nov 11 '11 at 23:40
the problem is: "sometimes ex.: pictures get corrupted [but this is rarely] so that I want to detect the problem before the users see that xy picture file on the router cannot be accessed anymore. :) – LanceBaynes Nov 12 '11 at 5:38

If you need to guard against malicious damage, then MD5 is the fastest hash which is secure enough (although it does have known weaknesses and so SHA2 is strongly preferred). If you just want to guard against accidental damage, then a CRC checksum will be faster and good enough. The standard cksum utility can be used to calculate this.

share|improve this answer

I compared Gnu/Linux checksum programs (not including CRC) just a couple months ago and found md5sum to be the fastest. I wouldn't think any of its vulnerabilities would apply in the case you describe.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.