cksum命令不识别-a选项

发布于 2025-02-09 06:07:01 字数 1045 浏览 1 评论 0原文

我正在尝试使用文件目录中的CRC32,SHA1和SHA256算法自动化校验和生成,并且根据CKSUM(v.8.32)的错误(v.8.32),

根据Cksum 手动在gnu.org上,它识别选项-a -a or or or 代码> - 算法可以从支持的校验和算法列表(包括SHA1,SHA256和CRC)中进行选择,但似乎无法正常工作。

命令:

cksum -a sha1 foo.txt

给出错误消息:

cksum: invalid option -- 'a'
Try 'cksum --help' for more information.

我尝试运行cksum - -help,但它仅打印以下内容:

Usage: cksum [FILE]...
  or:  cksum [OPTION]
Print CRC checksum and byte counts of each FILE.

      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/cksum>
or available locally via: info '(coreutils) cksum invocation'

它指向我的资源无济于事。

怎么了?有更好的方法吗?

I'm trying to automate checksum generation with CRC32, SHA1, and SHA256 algorithms on a directory of files, and I'm getting errors from cksum (v.8.32)

According to the cksum manual at gnu.org, it recognizes the option -a or --algorithm to choose from a list of supported checksum algorithms (including sha1, sha256, and crc), but it does not appear to be working.

The command:

cksum -a sha1 foo.txt

Gives the error message:

cksum: invalid option -- 'a'
Try 'cksum --help' for more information.

I tried running cksum --help, but it only prints the following:

Usage: cksum [FILE]...
  or:  cksum [OPTION]
Print CRC checksum and byte counts of each FILE.

      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/cksum>
or available locally via: info '(coreutils) cksum invocation'

And the resources it points me to are not helpful.

What is going wrong? Is there a better approach to take?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

假装不在乎 2025-02-16 06:07:01

您需要gnu coreutils&gt; = 9.0(即cksum版本&gt; = 9.0)

这是版本9.0的ChangElog说:

CKSUM现在支持-a选项以选择任何摘要。

You need GNU Coreutils >= 9.0 (i.e. cksum version >= 9.0)

Here's what the changelog for version 9.0 says:

cksum now supports the -a option to select any digest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文