리눅스 patch

Ykhwong (토론 | 기여)님의 2018년 8월 15일 (수) 11:17 판
  다른 뜻에 대해서는 패치 문서를 참조하십시오.

1 개요

리눅스 patch
/usr/bin/patch
  • 원본파일에 diff 파일(변경내역)을 적용하는 리눅스 명령어
  • 프로그래밍의 창시자 래리 월이 개발한 유틸리티이다.

2 실습

[root@zetawiki ~]# cat 1.txt
hello
world
[root@zetawiki ~]# cat 2.txt
Hello
World!
[root@zetawiki ~]# diff -u 1.txt 2.txt
--- 1.txt	2015-08-14 17:21:07.938002288 +0900
+++ 2.txt	2015-08-14 17:21:29.429003741 +0900
@@ -1,2 +1,2 @@
-hello
-world
+Hello
+World!
[root@zetawiki ~]# patch < 3.diff
patching file 1.txt
[root@zetawiki ~]# cat 1.txt
Hello
World!

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}