如何对整个文件夹结构进行校验和?
我有一个大型文件夹结构(即 2-3GB 的数据),需要根据另一个驱动器上的单独结构进行验证。
有没有办法对整个目录结构进行校验和以确保这两个结构以及所有文件内容完全匹配?
I have a large folder structure (i.e. 2-3GB worth of data) that needs to be verified against a separate structure on another drive.
Is there a way to checksum the entire directory structure to ensure that the two structures, as well as all file contents, match exactly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这种情况下,校验和将无济于事,因为同一过程将读取两组数据。当您必须跨进程或系统进行通信(换句话说,不同的“事物”正在读取不同的目标)时,这样的摘要值非常有用,以便您可以通过通信通道传递较小的数据集。
就您而言,您的应用程序将读取两者,因此简单的比较将是您最好的选择。
A checksum won't help you in this circumstance, as the same process is going to be reading both sets of data. A digest value like that is useful when you have to communicate across processes or systems (in other words, different "things" are reading the different targets) so that you can pass a smaller set of data across the communication channel.
In your case, your application is going to be reading both, so a simple comparison is going to be your best bet.