빅

패치 파일 만들어 보기

· 2012-05-10 (목) 16:36:53 · 1973
 패치 파일 만들때 유용한 방법입니다. 
 
[root@linuxtip byoungguk]# vi test.1
-----
aaa
bbb
ccc
-----
[root@linuxtip byoungguk]# cp -pv test.1 test.1-orig
`test.1' -> `test.1-orig'
 
[root@linuxtip byoungguk]# vi test.1
-----
aaa
bbb
ccc
ddd      --->추가
-----
 
[root@linuxtip byoungguk]# diff -urN test.1-orig test.1 > test.1-new.diff
 
[root@linuxtip byoungguk]# vi test.1-new.diff
 
[root@linuxtip byoungguk]# cp -pv test.1-orig test.1
`test.1-orig' -> `test.1'
원래파일로 다시 복사하고
 
[root@linuxtip byoungguk]# patch < test.1-new.diff
patching file test.1
 
패치를 안한 상태로 원복할려면
 
[root@linuxtip byoungguk]# patch < test.1-new.diff -R
patching file test.1
 
|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
Linux 12-04-26 조회 1,825
Linux 12-04-26 조회 1,947
Linux 12-04-26 조회 2,078
Linux 12-04-26 조회 2,231
Linux 12-04-26 조회 2,302
Linux 12-04-26 조회 2,646
Linux 12-04-26 조회 6,212
Linux 12-04-26 조회 1,657
Linux 12-04-26 조회 2,501
Linux 12-04-26 조회 2,210
JavaScript 12-04-26 조회 2,600
Linux 12-04-26 조회 2,041
JavaScript 12-04-26 조회 3,504
PHP 12-04-26 조회 4,000
기타 12-04-26 조회 2,954
jQuery 12-04-25 조회 5,385
MySQL 12-04-25 조회 3,220
PHP 12-04-25 조회 2,536
Linux 12-04-25 조회 2,005
Linux 12-04-25 조회 1,937
Linux 12-04-25 조회 1,800
Linux 12-04-25 조회 1,781
Linux 12-04-25 조회 2,258
Linux 12-04-25 조회 2,336
Linux 12-04-24 조회 3,992
Linux 12-04-24 조회 1,822
Linux 12-04-24 조회 1,492
Linux 12-04-24 조회 1,669
Linux 12-04-24 조회 1,691
Linux 12-04-24 조회 1,836