#1108363 coreutils: cksum -c fails by default with "no properly formatted checksum lines found"

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
Alex King
Date:
2025-06-27 13:47:01 UTC
Severity:
normal
#1108363#5
Date:
2025-06-27 01:44:50 UTC
From:
To:
Dear Maintainer,

I'm trying to work out if a file has changed.

The cksum command has a -c option to check that a previously computed
checksum is still valid.  This does not work with the default algorithm
(crc).

From the manual page: "When checking, the input should be a former output of
this program"

I tried with the following command:

$ cksum 20250429_211958724_iOS.jpg |cksum -c

With the result:
cksum: 'standard input': no properly formatted checksum lines found

This invocation should result in an OK message, as is seen if I use the md5
algorithm:

$ cksum -a md5 20250429_211958724_iOS.jpg |cksum -c
20250429_211958724_iOS.jpg: OK

The info page at
https://www.gnu.org/software/coreutils/manual/html_node/cksum-common-options.html
specifically states "the default output format" is a supported input format
for cksum -c, (as well as the tagged output format which is used when md5 is
selected.)

This may be an upstream bug (I haven't checked,) but if not it should be
fixed (or a note made in the manual page that debian's version lacks the
feature.)

I also checked this with testing (coreutils      9.7-3), the same bug exists
there.

Thanks,
Alex

#1108363#10
Date:
2025-06-27 13:44:58 UTC
From:
To:
Files are not checked against legacy crc output format.
I'll improve the doc upstream to eplicitly say the 3 modes supported but --check are:
untagged, tagged, bsd reverse.

cheers,
Pádraig