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 want to store SHA512 checksum of the file for my application. How to do it in common (popular) way? So this checksum can be used but by third party application too.

share|improve this question
up vote 4 down vote accepted

Write the checksum as lowercase hex digits followed by two spaces and then the filename, with one file per line. This is the format used by md5sum and the various sha*sum CLI tools.

$ sha512sum t.txt
d663b43c84ab4ba20040e568d3cb799512fcc00f1053f96f3079345f680b39429adc92f9c8c45fc9ae6053173ddc5b35ade25ae1d5c91e57b809d0c021d5c891  t.txt

$ sha512sum -c <(sha512sum t.txt)
t.txt: OK
share|improve this answer
Does it support paths instead of filenames? – ShyBoy Oct 21 '11 at 7:44
It does, both relative and absolute. – Ignacio Vazquez-Abrams Oct 21 '11 at 10:45

All schecksum files I've seen were just plain ASCII files which contained the checksum only. This way they may be easily compared with checksum command outputs.

Good practice is to indicate the checksum algorithm used with a filename suffix, eg .md5 or .crc.

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.