Use #
as a comment character.
The accepted answers suggesting ;
works with Total Commander in Windows, but gives an error with GNU's md5sum
, and probably also with other tools:
md5sum: WARNING: 1 line is improperly formatted
But both Total Commander and the standard md5sum
accept the usual Unix comment character #
instead. So use that.
Additional notes:
While Windows has traditionally been using ;
as a comment character, particularly in it's older .ini files, Unix mostly uses #
in it's shells and most scripting environments. (and Windows too now, in Powershell).
Since (arguably) most uses of md5 are on Unix machines where tools like md5
on Macs or md5sum
on Linux come with the OS, the traditional #
seems a bit safer.
Note also that TC on Windows accepts .md5 files with Unix "LF" line endings (or "/" as path separator), but the Unix tools cannot check md5 files using Windows "CRLF" line endings (or "\" in paths).
However, there is nothing about comments in the original RFC 1321, and there doesn't seem to be any official mention of using comments in .md5 files...