星期二, 3月 01, 2011

diff 與 patch 筆記

diff -urN file file_new >> xxx.patch

patch -p0 < xxx.patch

ex: /aaa/bbb/ccc.c
-p0代表去掉0層 ex: /aaa/bbb/ccc.c
-p1 則是去掉1層 ex: /bbb/ccc.c
...
以此類推