![计算两张图片是否完全相同](https://i-blog.csdnimg.cn/blog_migrate/d3d06cca7a0bed3aba16777249a7303b.png)
计算两张图片是否完全相同
![how-can-you-tell-if-two-dvds-are-exactly-the-same-or-not-00 how-can-you-tell-if-two-dvds-are-exactly-the-same-or-not-00](https://i-blog.csdnimg.cn/blog_migrate/bd238499df097d1da7f1d2c56c1f5c9b.png)
Whether it is just a matter of curiosity or a genuine need to know, how do you tell if two DVDs are exactly the same? Today’s SuperUser Q&A looks at some different ways to find out.
无论是出于好奇还是真正需要知道,您如何确定两张DVD是否完全相同? 当今的超级用户常见问题解答着眼于一些不同的查找方法。
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。
Photo courtesy of Luca Colli (Flickr).
照片由Luca Colli(Flickr)提供 。
问题 (The Question)
SuperUser reader Mega wants to know if there is a way to tell if two DVDs are exactly the same or not:
超级用户阅读器Mega想要知道是否有办法判断两张DVD是否完全相同:
I have two DVDs and if I open the them, then copy the contents to my hard-drive to compare the respective files, it shows no difference. As far as I know, DVDs also have some additional content (such as information saying if the DVD is bootable along with some formatting information I guess).
我有两张DVD,如果我将它们打开,然后将内容复制到硬盘驱动器中以比较各个文件,则没有区别。 据我所知,DVD还具有一些其他内容(例如说DVD是否可启动的信息以及一些我猜想的格式化信息)。
How can I also check this additional content? Is it possible without additional programs on Windows or Ubuntu?
我还如何检查此其他内容? 在Windows或Ubuntu上没有其他程序就可以吗?
Are there any methods a person could use to verify whether two DVDs are identical or not?
一个人可以使用什么方法来验证两张DVD是否相同?
答案 (The Answer)
SuperUser contributors mtak and Dithermaster have the answer for us. First up, mtak:
超级用户贡献者mtak和Dithermaster为我们提供了答案。 首先,mtak:
The easiest way to determine if two discs are the same is to run a hash of both of them:
确定两个光盘是否相同的最简单方法是对两个光盘进行哈希处理:
- sudo md5sum /dev/cdrom 须藤md5sum / dev / cdrom
If the hashes match, then the disks are exactly the same. However, if the hashes do not match, then this will not tell you what is different about them. If even a single bit is different, you will get a totally different hash.
如果哈希值匹配,则磁盘完全相同。 但是,如果哈希值不匹配,则不会告诉您它们的不同之处。 如果哪怕是一点点都不一样,那么您将获得完全不同的哈希值。
You can check the partition table of a disc with fdisk:
您可以使用fdisk检查光盘的分区表:
- sudo fdisk -l /dev/cdrom 须藤fdisk -l / dev / cdrom
Followed by the answer from Dithermaster:
随后是Dithermaster的回答:
Just comparing folders and files misses other things about the disc. If you create an .ISO image file from each disc and byte compare them, you would have a better idea if the discs are really the same or not.
仅比较文件夹和文件会丢失有关光盘的其他信息。 如果从每个光盘创建一个.ISO映像文件并对其进行字节比较,则您会更好地知道这些光盘是否确实相同。
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程 。
翻译自: https://www.howtogeek.com/191024/how-can-you-tell-if-two-dvds-are-exactly-the-same-or-not/
计算两张图片是否完全相同