计算目录的校验和

发布于 2024-09-29 02:27:43 字数 92 浏览 0 评论 0原文

我需要计算相关目录的校验和。

它应该为该目录返回一个数字,而不是为其中的每个文件返回一个数字。

奎斯,你能帮我吗?

谢谢。

i need to calculate a checksum for a directory in question.

It should return one number for this directory, not for each file inside it.

Can you, quys, help me with it ?

Thanks.

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

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

发布评论

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

评论(2

浅唱々樱花落 2024-10-06 02:27:43

您可以使用 tar 来执行此操作。类似 tar -c dir/ | 之类的东西md5sum -b,尽管您可能需要使用 tar 选项,因此它不包括访问时间(如果有人访问该目录中的文件,这会弄乱校验和,即使不修改其中任何一个)。

You may be able to use tar to do this. Something like tar -c dir/ | md5sum -b, although you may need to play with the options to tar so it doesn't include access times (which would mess up the checksum if somebody accesses the files in that directory, even without modifying any of them).

谁许谁一生繁华 2024-10-06 02:27:43

查看 md5deep。从其主页

md5deep 是一组用于计算任意数量文件的 MD5、SHA-1、SHA-256、Tiger 或 Whirlpool 消息摘要的程序。

我自己没有使用过它,但据我所知,它几乎是来自 GNU Coreutils

Check out md5deep. From its homepage:

md5deep is a set of programs to compute MD5, SHA-1, SHA-256, Tiger, or Whirlpool message digests on an arbitrary number of files.

I haven't used it myself, but from what I gather it's pretty much a collection of multi-file versions of md5sum, sha256sum and similar checksum tools from GNU Coreutils.

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