패치 파일 만들어 보기

· 13년 전 · 1803
 패치 파일 만들때 유용한 방법입니다. 
 
[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
 
|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

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

+
분류 제목 글쓴이 날짜 조회
jQuery 13년 전 조회 2,307
기타 13년 전 조회 2,772
jQuery 13년 전 조회 3,417
PHP 13년 전 조회 1,881
jQuery 13년 전 조회 8,429
Linux 13년 전 조회 2,716
Linux 13년 전 조회 1,595
Linux 13년 전 조회 2,143
Linux 13년 전 조회 2,053
Linux 13년 전 조회 2,328
Linux 13년 전 조회 1,500
JavaScript 13년 전 조회 2,935
Linux 13년 전 조회 3,262
Linux 13년 전 조회 1,711
Linux 13년 전 조회 1,804
Linux 13년 전 조회 2,148
Linux 13년 전 조회 4,530
Linux 13년 전 조회 1,776
Linux 13년 전 조회 1,956
Linux
[Linux]
13년 전 조회 1,853
Linux 13년 전 조회 1,673
Linux 13년 전 조회 2,148
Linux 13년 전 조회 2,909
Linux 13년 전 조회 1,942
Linux 13년 전 조회 1,664
Linux 13년 전 조회 2,655
Linux 13년 전 조회 1,772
MySQL 13년 전 조회 2,839
기타 13년 전 조회 5,325
기타 13년 전 조회 2,393