如何比较二进制文件以检查它们是否相同? [英] How to compare binary files to check if they are the same?
本文介绍了如何比较二进制文件以检查它们是否相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
了解两个二进制文件是否相同(时间戳除外)的最简单方法(在Ubuntu Linux上使用图形工具或命令行)是什么?我不需要实际提取差异.我只需要知道它们是否相同.
What is the easiest way (using a graphical tool or command line on Ubuntu Linux) to know if two binary files are the same or not (except for the time stamps)? I do not need to actually extract the difference. I just need to know whether they are the same or not.
推荐答案
标准的Unix diff
将显示文件是否相同:
The standard unix diff
will show if the files are the same or not:
[me@host ~]$ diff 1.bin 2.bin
Binary files 1.bin and 2.bin differ
如果命令没有输出,则表示文件没有差异.
If there is no output from the command, it means that the files have no differences.
这篇关于如何比较二进制文件以检查它们是否相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文