對於這些基本tool不熟實在是很不方便啊~~
------------
vi t1 t2
t1:
My Name is barry.
I am 20 years old.
Your name is tina.
How old are you?
t2:
My name is marry.
I am 20 years old.
You name is tom.
How old are you?
//產生diff檔,t1視為較舊的檔案,需要被更新
diff -Naur ./t1 ./t2 > t_patch
//patch t1
patch -p0 < t_patch
patch的參數-p0,-p1,-p2表示對於要處理的file/folder的階層。
參考:
Linux中 patch 的用法 @ 研究所學習筆記
Diff 和 Patch 的簡易操作使用筆記 - Tsung's Blog
沒有留言:
張貼留言