如何修复 diff: Binary files ... and ... differ
问题:
你想使用 diff 比较两个文本文件,但你只看到此错误消息:
diff_binary_output.txt
Binary files a.txt and b.txt differ解决方案
如果文件中只有少量二进制字符,即使它实际上是文本文件,也经常会出现此情况。使用 --text 标志强制以文本模式比较:
diff_text_mode.sh
diff --text a.txt b.txtCheck out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow