분류1

임베디드시스템

제목

How can i generate patch-file?

If you wana generates a patch-file, must knows linuxs diff and zcat commands. ex) denote A is current directory denote B is patch target directory #diff -Urn linux2.4.19_org linux2.4.19_new > linux.2.4.19.diff #gzip linux.24.19.diff #pwd /A #ls B linux.2.4.19.diff.gz #cp linux.2.4.19.diff.gz /A/B #cd B #zcat linux.2.4.19.diff |patch -p1 diff: The diff display the differences between two files. SYNTAX    diff OPTIONS... FROM-FILE TO-FILE OPTIONS    Multiple single letter options (unless they take an argument)    can be combined into a single command line word:    so `-ac is equivalent to `-a -c. `-LINES   Show LINES (an integer) lines of context.This option is obsolete. `-a   Treat all files as text and compare them line-by-line, even if they   do not seem to be text. `-b   Ignore changes in amount of white space. `-B   Ignore changes that just insert or delete blank lines. `--binary   Read and write data in binary mode. `--brief   Report only whether the files differ, not the details of the   differences. *Note Brief::. `-c   Use the context output format. `-C LINES `--context[=LINES]   Use the context output format, showing LINES (an integer) lines of   context, or three if LINES is not given. *Note Context Format::.   For proper operation, `patch typically needs at least two lines of   context. `--changed-group-format=FORMAT   Use FORMAT to output a line group containing differing lines from   both files in if-then-else format. *Note Line Group Formats::. `-d   Change the algorithm perhaps find a smaller set of changes. This   makes `diff slower (sometimes much slower). *Note diff   Performance::. `-D NAME   Make merged `#ifdef format output, conditional on the preprocessor   macro NAME. *Note If-then-else::. `-e `--ed   Make output that is a valid `ed script. `--exclude=PATTERN   When comparing directories, ignore files and subdirectories whose   basenames match PATTERN. *Note Comparing Directories::. `--exclude-from=FILE   When comparing directories, ignore files and subdirectories whose   basenames match any pattern contained in FILE. *Note Comparing   Directories::. `--expand-tabs   Expand tabs to spaces in the output, to preserve the alignment of   tabs in the input files. *Note Tabs::. `-f   Make output that looks vaguely like an `ed script but has changes   in the order they appear in the file. *Note Forward ed::. `-F REGEXP   In context and unified format, for each hunk of differences, show   some of the last preceding line that matches REGEXP. `--forward-ed   Make output that looks vaguely like an `ed script but has changes   in the order they appear in the file. `-h   This option currently has no effect; it is present for Unix   compatibility. `-H   Use heuristics to speed handling of large files that have numerous   scattered small changes. *Note diff Performance::. `--horizon-lines=LINES   Do not discard the last LINES lines of the common prefix and the   first LINES lines of the common suffix. *Note diff Performance::. `-i   Ignore changes in case; consider upper- and lower-case letters   equivalent. *Note Case Folding::. `-I REGEXP   Ignore changes that just insert or delete lines that match REGEXP.   *Note Specified Folding::. `--ifdef=NAME   Make merged if-then-else output using NAME. *Note If-then-else::. `--ignore-all-space   Ignore white space when comparing lines. *Note White Space::. `--ignore-blank-lines   Ignore changes that just insert or delete blank lines. *Note   Blank Lines::. `--ignore-case   Ignore changes in case; consider upper- and lower-case to be the   same. *Note Case Folding::. `--ignore-matching-lines=REGEXP   Ignore changes that just insert or delete lines that match REGEXP.   *Note Specified Folding::. `--ignore-space-change   Ignore changes in amount of white space. *Note White Space::. `--initial-tab   Output a tab rather than a space before the text of a line in   normal or context format. This causes the alignment of tabs in   the line to look normal. *Note Tabs::. `-l   Pass the output through `pr to paginate it. *Note Pagination::. `-L LABEL   Use LABEL instead of the file name in the context format (*note   Context Format::.) and unified format (*note Unified Format::.)   headers. *Note RCS::. `--label=LABEL   Use LABEL instead of the file name in the context format (*note   Context Format::.) and unified format (*note Unified Format::.)   headers. `--left-column   Print only the left column of two common lines in side by side   format. *Note Side by Side Format::. `--line-format=FORMAT   Use FORMAT to output all input lines in if-then-else format.   *Note Line Formats::. `--minimal   Change the algorithm to perhaps find a smaller set of changes.   This makes `diff slower (sometimes much slower). *Note diff   Performance::. `-n   Output RCS-format diffs; like `-f except that each command   specifies the number of lines affected. *Note RCS::. `-N `--new-file   In directory comparison, if a file is found in only one directory,   treat it as present but empty in the other directory. *Note   Comparing Directories::. `--new-group-format=FORMAT   Use FORMAT to output a group of lines taken from just the second   file in if-then-else format. *Note Line Group Formats::. `--new-line-format=FORMAT   Use FORMAT to output a line taken from just the second file in   if-then-else format. *Note Line Formats::. `--old-group-format=FORMAT   Use FORMAT to output a group of lines taken from just the first   file in if-then-else format. *Note Line Group Formats::. `--old-line-format=FORMAT   Use FORMAT to output a line taken from just the first file in   if-then-else format. *Note Line Formats::. `-p   Show which C function each change is in. *Note C Function   Headings::. `-P   When comparing directories, if a file appears only in the second   directory of the two, treat it as present but empty in the other.   *Note Comparing Directories::. `--paginate   Pass the output through `pr to paginate it. *Note Pagination::. `-q   Report only whether the files differ, not the details of the   differences. *Note Brief::. `-r   When comparing directories, recursively compare any subdirectories   found. *Note Comparing Directories::. `--rcs   Output RCS-format diffs; like `-f except that each command   specifies the number of lines affected. *Note RCS::. `--recursive   When comparing directories, recursively compare any subdirectories   found. *Note Comparing Directories::. `--report-identical-files   Report when two files are the same. *Note Comparing Directories::. `-s   Report when two files are the same. *Note Comparing Directories::. `-S FILE   When comparing directories, start with the file FILE. This is   used for resuming an aborted comparison. *Note Comparing   Directories::. `--sdiff-merge-assist   Print extra information to help `sdiff. `sdiff uses this option   when it runs `diff. This option is not intended for users to use   directly. `--show-c-function   Show which C function each change is in. *Note C Function   Headings::. `--show-function-line=REGEXP   In context and unified format, for each hunk of differences, show   some of the last preceding line that matches REGEXP. *Note   Specified Headings::. `--side-by-side   Use the side by side output format. *Note Side by Side Format::. `--speed-large-files   Use heuristics to speed handling of large files that have numerous   scattered small changes. *Note diff Performance::. `--starting-file=FILE   When comparing directories, start with the file FILE. This is   used for resuming an aborted comparison. *Note Comparing   Directories::. `--suppress-common-lines   Do not print common lines in side by side format. *Note Side by   Side Format::. `-t   Expand tabs to spaces in the output, to preserve the alignment of   tabs in the input files. *Note Tabs::. `-T   Output a tab rather than a space before the text of a line in   normal or context format. This causes the alignment of tabs in   the line to look normal. *Note Tabs::. `--text   Treat all files as text and compare them line-by-line, even if they   do not appear to be text. *Note Binary::. `-u   Use the unified output format. *Note Unified Format::. `--unchanged-group-format=FORMAT   Use FORMAT to output a group of common lines taken from both files   in if-then-else format. *Note Line Group Formats::. `--unchanged-line-format=FORMAT   Use FORMAT to output a line common to both files in if-then-else   format. *Note Line Formats::. `--unidirectional-new-file   When comparing directories, if a file appears only in the second   directory of the two, treat it as present but empty in the other.   *Note Comparing Directories::. `-U LINES `--unified[=LINES]   Use the unified output format, showing LINES (an integer) lines of   context, or three if LINES is not given. *Note Unified Format::.   For proper operation, `patch typically needs at least two lines of   context. `-v `--version   Output the version number of `diff. `-w   Ignore white space when comparing lines. `-W COLUMNS `--width=COLUMNS   Use an output width of COLUMNS in side by side format. `-x PATTERN   When comparing directories, ignore files and subdirectories whose   basenames match PATTERN. *Note Comparing Directories::. `-X FILE   When comparing directories, ignore files and subdirectories whose   basenames match any pattern contained in FILE. *Note Comparing   Directories::. `-y   Use the side by side output format.

첨부파일 다운로드

등록자송영호

등록일2004-02-23

조회수4,218

  • 페이스북 공유
  • 트위터 공유
  • Google+ 공유
  • 인쇄하기
 
스팸방지코드 :
번호 제목 등록자 등록일 조회수
98 임베디드시 HBE-Allinone 연습문제 해답 관련

HB_MCU

2013.10.14 28,567
97 유비쿼터스 TinyOS 2.0 소스코드를 ZigbeXStudio에서 사용하고자 할 때

HB_USN

2010.08.25 27,434
96 임베디드시 [SMII-P320] Mplayer 포팅가이드

임베디드팀

2010.06.15 26,849
95 유비쿼터스 [ZigbeX II] 온습도값이 안나오는 경우 해결방법

정윤호

2010.06.10 26,453
94 임베디드시 P320 장비계열 ADB 설치문서

박한수

2010.04.07 15,274
93 임베디드시 [Android] Eclipse 실행 시 오류 해결 방법

S/W팀

2010.04.02 13,804
92 유비쿼터스 WinAVR로 만든 ZigbeX2 LED제어 예제

이철희

2010.03.09 13,804
91 임베디드시 Android 탑재 제품에서 사용가능한 USB 무선랜 및 USB GPS

S/W팀

2010.03.04 15,303
90 임베디드시 Windows Embedded CE 6.0 개발툴 다운로드 링크

HB_Embedded

2009.11.04 14,042
89 임베디드시 CDMA2관련 질문!!

이강은

2008.12.11 6,116