Diff: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Linux diff 명령어 내용 정리 | Linux diff 명령어 내용 정리 | ||
== Options == | |||
=== -u, -U NUM, --unified[=NUM] === | |||
지정된 NUM(default 3) 라인크기의 unified text 형태의 diff 를 만든다. | |||
'''Example''' | |||
<pre> | |||
$ diff -u external/Makefile internal/Makefile | |||
--- external/Makefile 2016-08-15 09:47:10.516758058 +0200 | |||
+++ internal/Makefile 2016-08-15 11:31:23.491594343 +0200 | |||
@@ -18,10 +18,39 @@ | |||
DDIR=test-doc | |||
+PDFDIR= | |||
+ifeq ($(BUILD_PDF),1) | |||
+PDFDIR=$(DDIR)/*.pdf | |||
+endif | |||
+ | |||
</pre> | |||
== patch file 만들기 == | == patch file 만들기 == |
Latest revision as of 09:47, 15 August 2016
Overview
Linux diff 명령어 내용 정리
Options
-u, -U NUM, --unified[=NUM]
지정된 NUM(default 3) 라인크기의 unified text 형태의 diff 를 만든다.
Example
$ diff -u external/Makefile internal/Makefile --- external/Makefile 2016-08-15 09:47:10.516758058 +0200 +++ internal/Makefile 2016-08-15 11:31:23.491594343 +0200 @@ -18,10 +18,39 @@ DDIR=test-doc +PDFDIR= +ifeq ($(BUILD_PDF),1) +PDFDIR=$(DDIR)/*.pdf +endif +
patch file 만들기
$ diff -Naur <org_file> <changed_file> > simple.patch