빅

패치 파일 만들어 보기

· 2012-05-10 (목) 16:36:53 · 2005
 패치 파일 만들때 유용한 방법입니다. 
 
[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,404건

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

+
분류 제목 글쓴이 날짜 조회
Linux 12-05-15 조회 2,412
Linux 12-05-15 조회 1,985
jQuery 12-05-15 조회 3,527
Linux 12-05-14 조회 1,706
Linux 12-05-14 조회 1,821
Linux 12-05-14 조회 1,967
Linux 12-05-14 조회 2,434
Linux 12-05-14 조회 2,164
jQuery 12-05-14 조회 2,489
기타 12-05-13 조회 2,997
jQuery 12-05-12 조회 3,672
PHP 12-05-11 조회 2,099
jQuery 12-05-11 조회 8,651
Linux 12-05-11 조회 2,941
Linux 12-05-11 조회 1,804
Linux 12-05-11 조회 2,376
Linux 12-05-11 조회 2,268
Linux 12-05-11 조회 2,557
Linux 12-05-11 조회 1,723
JavaScript 12-05-10 조회 3,191
Linux 12-05-10 조회 3,491
Linux 12-05-10 조회 1,916
Linux 12-05-10 조회 2,006
Linux 12-05-10 조회 2,398
Linux 12-05-10 조회 4,788
Linux 12-05-10 조회 1,983
Linux 12-05-10 조회 2,167
Linux
[Linux]
12-05-10 조회 2,051
Linux 12-05-10 조회 1,890
Linux 12-05-10 조회 2,393