diff: patch
2008年09月10日 (linux)
command
% cat >patchtest.old aaa bbb ccc % cat >patchtest.new aaa xxx ccc % ls patchtest.new patchtest.old patchtest.txt % diff patchtest.old patchtest.new 2c2 < bbb --- > xxx % diff -c patchtest.old patchtest.new *** patchtest.old 2008-09-09 20:53:01.000000000 +0900 --- patchtest.new 2008-09-09 20:53:17.000000000 +0900 *************** *** 1,3 **** aaa ! bbb ccc --- 1,3 ---- aaa ! xxx ccc % diff -c patchtest.old patchtest.new >patchtest.patch % patch <patchtest.patch patching file patchtest.old % diff patchtest.old patchtest.new %
note
cf. % man patch % man diff
PR
Comment