菜鸟教程:https://www.runoob.com/linux/linux-comm-diff.html
直接比较:
diff 1.txt 2.txt
并排输出:(推荐)
diff 1.txt 2.txt -y -W 50
- "|"表示前后2个文件内容有不同
- "<"表示后面文件比前面文件少了1行内容
- ">"表示后面文件比前面文件多了1行内容
菜鸟教程:https://www.runoob.com/linux/linux-comm-diff.html
直接比较:
diff 1.txt 2.txt
并排输出:(推荐)
diff 1.txt 2.txt -y -W 50