如何强制 diff 比较二进制文件

使用 --text 标志强制 diff 以文本模式比较文件,即使它认为它们是二进制文件:

diff.sh
diff --text a.txt b.txt

Check out similar posts by category: Linux