On 27/06/2025 02:44, Alex King wrote:
Package: coreutils
Version: 9.1-1
Severity: normal
X-Debbugs-Cc: [email protected]

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.

Well it's not a bug.
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

Reply via email to