10 09/2014

diff and patch

最后更新: Wed Sep 10 2014 12:39:11 GMT+0800

diff 对比文件

对比 1 2 区别写在 3(1,2 可以是目录)

diff 1 2 > 3

如果 1 2 是目录并且含有子目录的话

diff -r 1 2 > d

patch 将对比结果应用

根据 3 把 1 写成 2

patch 1 3

其它

  • git 用的就是 diff patch 来减少 scp(ssh)的流量,所以快
  • windows 下 dos 叫 fc