"리눅스 patch"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-==참고 자료== +==참고==))
43번째 줄: 43번째 줄:


==참고==
==참고==
*https://en.wikipedia.org/wiki/Patch_(Unix)
* {{위키백과|patch}}
* {{영어위키백과|Patch_(Unix)}}


[[분류: /usr/bin]]
[[분류: /usr/bin]]

2018년 8월 15일 (수) 11:16 판

  다른 뜻에 대해서는 패치 문서를 참조하십시오.

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 }}