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.

Thanks,
Alex

-- System Information:
Debian Release: 12.11
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-37-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_NZ:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages coreutils depends on:
ii  libacl1      2.3.1-3
ii  libattr1     1:2.5.1-4
ii  libc6        2.36-9+deb12u10
ii  libgmp10     2:6.2.1+dfsg1-1.1
ii  libselinux1  3.4-1+b6

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information

Reply via email to