1. vimdiff
$ vimdiff in.txt out.txt
垂直打开: vimdiff point.c point-a.c
水平打开: vimdiff -o point.c point-a.c
保存所有文件并退出:wqa!
不保存所有文件并退出:qa!
vimdiff依赖于diff命令,在使用之前确保你的系统有diff命令,更多操作参考vim手册.
2.diff
man diff
$ diff in.txt out.txt
Re:
1.vimdiff;
2.diff;