I know this is a late response, but this is to clarify the md5sum
usage for the benefit of others.................
The basic syntax for md5sum
md5sum [OPTION] [FILE] ...
md5sum [OPTION] --check [FILE]
When creating checksums for files, more than one filename may be used on the command line. And the manpage for md5sum
doesn't clarify the FILE
used for the --check
option (or -c
option), but it refers to the checksum list of files, not the files being checked.
To generate a MD5 checksum:
To check MD5 checksums against a list:
Also, the format for the MD5 checksum list isn't explained, either. It goes like this:
The first part, with all the n's is the MD5 checksum number, in hexadecimal format, and the second part is the filename of the FILE. IMPORTANT: Each MD5 checksum and filename MUST BE SEPARATED BY TWO SPACES, not a single space or tab. Otherwise you'll get the infamous error "no properly formatted MD5 checksum lines found". Other lines, such as comments, may be included in the checksum file list. md5sum
will simply ignore any lines that aren't properly formatted checksum lines.
You can easily create your own MD5 checksum list by redirecting the output of the md5sum
output to a file:
md5sum FILE1 FILE2 FILE3 > CHECKSUM.MD5
This will produce a MD5 checksum file, called CHECKSUM.MD5, with properly formatted checksum lines for each file.
Hope that helps clarify things a little since, in this case, the md5sum
documentation is _not_ very clear on the matter.