linux diff(differential) 命令

功能说明:比较文件的差异。语法:diff [OPTION]… FILES实例:diff -ur temp1 temp2diff -ur temp1 temp2 temp.diffopti

temp.diff

<table class=”mtable” style=”margin-bottom: 2em; border: 0px solid silver; background-color: #e5e5e5; width: 858px; margin-left: auto; margin-right: auto; color: #454545; font-family: Verdana,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 25.59375px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;”><tbody style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit;”>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–normal</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output a normal diff (This is the default).</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-q,<span class=”Apple-converted-space”>–brief
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>report only when files differ.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-s,<span class=”Apple-converted-space”>–report-identical-files
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>report when two files are the same.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-c,<span class=”Apple-converted-space”>-C<span class=”Apple-converted-space”>NUM,<span class=”Apple-converted-space”>–context[=NUM]</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output NUM (default 3) lines of copied context.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-u,<span class=”Apple-converted-space”>-U<span class=”Apple-converted-space”>NUM,<span class=”Apple-converted-space”>–unified[=NUM]</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output NUM (default 3) lines of unified context.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-e,<span class=”Apple-converted-space”>–ed
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output an<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/unix/ued.htm”&gt;ed<span class=”Apple-converted-space”>script.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-n,<span class=”Apple-converted-space”>–rcs
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output an<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/r/rcs.htm”&gt;RCS-format diff.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-y,<span class=”Apple-converted-space”>–side-by-side
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output in two columns.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-W,<span class=”Apple-converted-space”>–width=NUM</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output at most NUM (default 130) print columns.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–left-column</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output only the left column of common lines.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–suppress-common-lines</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>do not output common lines.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-p,<span class=”Apple-converted-space”>–show-c-function
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>show which C function each change is in.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-F,<span class=”Apple-converted-space”>–show-function-line=RE</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>show the most recent line matching RE.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
–label<span class=”Apple-converted-space”>LABEL</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>use LABEL instead of file name (this option can be repeated).</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-t,<span class=”Apple-converted-space”>–expand-tabs
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>expand tabs to spaces in output.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-T,<span class=”Apple-converted-space”>–initial-tab
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>make<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/t/tab.htm”&gt;tabs<span class=”Apple-converted-space”>line up by prepending a tab.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
–tabsize=NUM</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>tab stops every NUM (default 8) print columns.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–suppress-blank-empty</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>suppress space or tab before empty output lines.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-l,<span class=”Apple-converted-space”>–paginate
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>pass output through<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/unix/upr.htm”&gt;pr<span class=”Apple-converted-space”>to paginate it</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-r,<span class=”Apple-converted-space”>–recursive
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
<a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/r/recursive.htm”&gt;recursively<span class=”Apple-converted-space”>compare any<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/s/subdirec.htm”&gt;subdirectories<span class=”Apple-converted-space”>found.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-N,<span class=”Apple-converted-space”>–new-file
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>treat absent files as empty.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–unidirectional-new-file</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>treat absent first files as empty.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–ignore-file-name-case</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore case when comparing file names.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–no-ignore-file-name-case</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>consider case when comparing file names.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-x,<span class=”Apple-converted-space”>–exclude=PAT</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>exclude files that match PAT.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-X,<span class=”Apple-converted-space”>–exclude-from=FILE</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>exclude files that match any pattern in FILE.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-S,<span class=”Apple-converted-space”>–starting-file=FILE</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>start with FILE when comparing<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/d/director.htm”&gt;directories.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
–from-file=FILE1</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>compare FILE1 to all<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/o/operand.htm”&gt;operands; FILE1 can be a directory.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
–to-file=FILE2</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>compare all operands to FILE2; FILE2 can be a directory.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-i,<span class=”Apple-converted-space”>–ignore-case
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore case differences in file contents.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-E,<span class=”Apple-converted-space”>–ignore-tab-expansion
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore changes due to<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/t/tab.htm”&gt;tab<span class=”Apple-converted-space”>expansion.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-b,<span class=”Apple-converted-space”>–ignore-space-change
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore changes in the amount of<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/w/whitspac.htm”&gt;white space.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-w,<span class=”Apple-converted-space”>–ignore-all-space
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore all white space.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-B,<span class=”Apple-converted-space”>–ignore-blank-lines
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore changes whose lines are all blank.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-I,<span class=”Apple-converted-space”>–ignore-matching-lines=RE</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>ignore changes whose lines all match RE.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-a,<span class=”Apple-converted-space”>–text
</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>treat all files as text.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>–strip-trailing-cr</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>strip trailing<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/c/cr.htm”&gt;carriage return<span class=”Apple-converted-space”>on input.</td>
</tr>
<tr class=”tcw” style=”margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;”>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>
-D,<span class=”Apple-converted-space”>–ifdef=NAME</td>
<td style=”margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;”>output merged file with <strong>#ifdef NAME</strong>' diffs.</td&gt; </tr&gt; <tr class="tcw" style="margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;"&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt; <strong>--GTYPE-group-format</strong>=GFMT</td&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt;format GTYPE input groups with GFMT.</td&gt; </tr&gt; <tr class="tcw" style="margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;"&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt; <strong>--line-format</strong>=LFMT</td&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt;format all input lines with LFMT.</td&gt; </tr&gt; <tr class="tcw" style="margin: 0px; padding: 0px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; background-color: #ffffff;"&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt; <strong>--LTYPE-line-format</strong>=LFMT</td&gt; <td style="margin: 0px; padding: 9px; border: 0px; font-weight: normal; font-style: normal; font-size: 16px; line-height: 1; font-family: inherit; vertical-align: top; border-spacing: 5px 10px;"&gt;format LTYPE input lines with LFMT.These format options provide fine-grained control over the output of diff,generalizing<span class="Apple-converted-space"&gt;</span><strong>-D</strong>/<strong>--ifdef</strong>.LTYPE is '<strong>old</strong>','<strong>new</strong>',or '<strong>unchanged</strong>'. GTYPE is LTYPE orchanged’.GFMT (only) may contain:%<: lines from FILE1%>: lines from FILE2%=: lines common to FILE1 and FILE2.%[-][WIDTH][.[PREC]]{doxX}LETTER:<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/unix/uprintf.htm”&gt;printf-style spec for LETTERLETTERs are as follows for new group,lower case for old group:F: first line numberL: last line numberN: number of lines = L-F+1E: F-1M: L+1%(A=B?T:E)<span class=”Apple-converted-space”>if A equals B then T else ELFMT (only) may contain:%L: contents of line%l: contents of line,excluding any trailing newline%[-][WIDTH][.[PREC]]{doxX}n: printf-style spec for input line numberBoth GFMT and LFMT may contain:%%: A literal ‘%’%c’C’: the single character C<span class=”Apple-converted-space”>%c’\OOO’: the character with<span class=”Apple-converted-space”><a style=”color: #663366; text-decoration: none; border-bottom-width: 0px !important;” href=”http://www.computerhope.com/jargon/o/octal.htm”&gt;octal<span class=”Apple-converted-space”>code OOOC: the character C (other characters represent themselves)</td>

作者: dawei

【声明】:永州站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部