/usr/share/doc/diffutils-doc/Invoking-diff.html is in diffutils-doc 1:3.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU Diffutils
(version 3.5, 4 August 2016),
and documents the GNU diff, diff3,
sdiff, and cmp commands for showing the
differences between files and the GNU patch command for
using their output to update files.
Copyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2016 Free
Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled
"GNU Free Documentation License." -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Comparing and Merging Files: Invoking diff</title>
<meta name="description" content="Comparing and Merging Files: Invoking diff">
<meta name="keywords" content="Comparing and Merging Files: Invoking diff">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="Invoking-diff3.html#Invoking-diff3" rel="next" title="Invoking diff3">
<link href="Invoking-cmp.html#cmp-Options" rel="prev" title="cmp Options">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Invoking-diff"></a>
<div class="header">
<p>
Next: <a href="Invoking-diff3.html#Invoking-diff3" accesskey="n" rel="next">Invoking diff3</a>, Previous: <a href="Invoking-cmp.html#Invoking-cmp" accesskey="p" rel="prev">Invoking cmp</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Invoking-diff-1"></a>
<h2 class="chapter">13 Invoking <code>diff</code></h2>
<a name="index-invoking-diff"></a>
<a name="index-diff-invocation"></a>
<p>The format for running the <code>diff</code> command is:
</p>
<div class="example">
<pre class="example">diff <var>options</var>… <var>files</var>…
</pre></div>
<p>In the simplest case, two file names <var>from-file</var> and
<var>to-file</var> are given, and <code>diff</code> compares the contents of
<var>from-file</var> and <var>to-file</var>. A file name of <samp>-</samp> stands for
the standard input.
</p>
<p>If one file is a directory and the other is not, <code>diff</code> compares
the file in the directory whose name is that of the non-directory.
The non-directory file must not be <samp>-</samp>.
</p>
<p>If two file names are given and both are directories,
<code>diff</code> compares corresponding files in both directories, in
alphabetical order; this comparison is not recursive unless the
<samp>--recursive</samp> (<samp>-r</samp>) option is given. <code>diff</code> never
compares the actual contents of a directory as if it were a file. The
file that is fully specified may not be standard input, because standard
input is nameless and the notion of “file with the same name” does not
apply.
</p>
<p>If the <samp>--from-file=<var>file</var></samp> option is given, the number of
file names is arbitrary, and <var>file</var> is compared to each named file.
Similarly, if the <samp>--to-file=<var>file</var></samp> option is given, each
named file is compared to <var>file</var>.
</p>
<p><code>diff</code> options begin with ‘<samp>-</samp>’, so normally file names
may not begin with ‘<samp>-</samp>’. However, <samp>--</samp> as an
argument by itself treats the remaining arguments as file names even if
they begin with ‘<samp>-</samp>’.
</p>
<p>An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#diff-Options" accesskey="1">diff Options</a>:</td><td> </td><td align="left" valign="top">Summary of options to <code>diff</code>.
</td></tr>
</table>
<hr>
<a name="diff-Options"></a>
<div class="header">
<p>
Up: <a href="#Invoking-diff" accesskey="u" rel="up">Invoking diff</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Options-to-diff"></a>
<h3 class="section">13.1 Options to <code>diff</code></h3>
<a name="index-diff-options"></a>
<a name="index-options-for-diff"></a>
<p>Below is a summary of all of the options that <acronym>GNU</acronym>
<code>diff</code> accepts. Most options have two equivalent names, one
of which is a single letter preceded by ‘<samp>-</samp>’, and the other of
which is a long name preceded by ‘<samp>--</samp>’. Multiple single letter
options (unless they take an argument) can be combined into a single
command line word: <samp>-ac</samp> is equivalent to <samp>-a -c</samp>. Long
named options can be abbreviated to any unique prefix of their name.
Brackets ([ and ]) indicate that an option takes an optional argument.
</p>
<dl compact="compact">
<dt><samp>-a</samp></dt>
<dt><samp>--text</samp></dt>
<dd><p>Treat all files as text and compare them line-by-line, even if they
do not seem to be text. See <a href="Comparison.html#Binary">Binary</a>.
</p>
</dd>
<dt><samp>-b</samp></dt>
<dt><samp>--ignore-space-change</samp></dt>
<dd><p>Ignore changes in amount of white space. See <a href="Comparison.html#White-Space">White Space</a>.
</p>
</dd>
<dt><samp>-B</samp></dt>
<dt><samp>--ignore-blank-lines</samp></dt>
<dd><p>Ignore changes that just insert or delete blank lines. See <a href="Comparison.html#Blank-Lines">Blank Lines</a>.
</p>
</dd>
<dt><samp>--binary</samp></dt>
<dd><p>Read and write data in binary mode. See <a href="Comparison.html#Binary">Binary</a>.
</p>
</dd>
<dt><samp>-c</samp></dt>
<dd><p>Use the context output format, showing three lines of context.
See <a href="Output-Formats.html#Context-Format">Context Format</a>.
</p>
</dd>
<dt><samp>--color [=<var>when</var>]</samp></dt>
<dd><a name="index-color_002c-distinguishing-different-context"></a>
<p>Specify whether to use color for distinguishing different contexts,
like header, added or removed lines. <var>when</var> may be omitted, or
one of:
</p><ul>
<li> none
<a name="index-none-color-option"></a>
Do not use color at all. This is the default when no –color option
is specified.
</li><li> auto
<a name="index-auto-color-option"></a>
<a name="index-terminal_002c-using-color-iff"></a>
Use color only if standard output is a terminal.
</li><li> always
<a name="index-always-color-option"></a>
Always use color.
</li></ul>
<p>Specifying <samp>--color</samp> and no <var>when</var> is equivalent to
<samp>--color=auto</samp>.
</p>
</dd>
<dt><samp>-C <var>lines</var></samp></dt>
<dt><samp>--context<span class="roman">[</span>=<var>lines</var><span class="roman">]</span></samp></dt>
<dd><p>Use the context output format, showing <var>lines</var> (an integer) lines of
context, or three if <var>lines</var> is not given. See <a href="Output-Formats.html#Context-Format">Context Format</a>.
For proper operation, <code>patch</code> typically needs at least two lines of
context.
</p>
<p>For compatibility <code>diff</code> also supports an obsolete option
syntax <samp>-<var>lines</var></samp> that has effect when combined with
<samp>-c</samp>, <samp>-p</samp>, or <samp>-u</samp>. New scripts should use
<samp>-U <var>lines</var></samp> (<samp>-C <var>lines</var></samp>) instead.
</p>
</dd>
<dt><samp>--changed-group-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a line group containing differing lines from
both files in if-then-else format. See <a href="Output-Formats.html#Line-Group-Formats">Line Group Formats</a>.
</p>
</dd>
<dt><samp>-d</samp></dt>
<dt><samp>--minimal</samp></dt>
<dd><p>Change the algorithm perhaps find a smaller set of changes. This makes
<code>diff</code> slower (sometimes much slower). See <a href="diff-Performance.html#diff-Performance">diff Performance</a>.
</p>
</dd>
<dt><samp>-D <var>name</var></samp></dt>
<dt><samp>--ifdef=<var>name</var></samp></dt>
<dd><p>Make merged ‘<samp>#ifdef</samp>’ format output, conditional on the preprocessor
macro <var>name</var>. See <a href="Output-Formats.html#If_002dthen_002delse">If-then-else</a>.
</p>
</dd>
<dt><samp>-e</samp></dt>
<dt><samp>--ed</samp></dt>
<dd><p>Make output that is a valid <code>ed</code> script. See <a href="Output-Formats.html#ed-Scripts">ed Scripts</a>.
</p>
</dd>
<dt><samp>-E</samp></dt>
<dt><samp>--ignore-tab-expansion</samp></dt>
<dd><p>Ignore changes due to tab expansion.
See <a href="Comparison.html#White-Space">White Space</a>.
</p>
</dd>
<dt><samp>-f</samp></dt>
<dt><samp>--forward-ed</samp></dt>
<dd><p>Make output that looks vaguely like an <code>ed</code> script but has changes
in the order they appear in the file. See <a href="Output-Formats.html#Forward-ed">Forward ed</a>.
</p>
</dd>
<dt><samp>-F <var>regexp</var></samp></dt>
<dt><samp>--show-function-line=<var>regexp</var></samp></dt>
<dd><p>In context and unified format, for each hunk of differences, show some
of the last preceding line that matches <var>regexp</var>. See <a href="Output-Formats.html#Specified-Headings">Specified Headings</a>.
</p>
</dd>
<dt><samp>--from-file=<var>file</var></samp></dt>
<dd><p>Compare <var>file</var> to each operand; <var>file</var> may be a directory.
</p>
</dd>
<dt><samp>--help</samp></dt>
<dd><p>Output a summary of usage and then exit.
</p>
</dd>
<dt><samp>--horizon-lines=<var>lines</var></samp></dt>
<dd><p>Do not discard the last <var>lines</var> lines of the common prefix
and the first <var>lines</var> lines of the common suffix.
See <a href="diff-Performance.html#diff-Performance">diff Performance</a>.
</p>
</dd>
<dt><samp>-i</samp></dt>
<dt><samp>--ignore-case</samp></dt>
<dd><p>Ignore changes in case; consider upper- and lower-case letters
equivalent. See <a href="Comparison.html#Case-Folding">Case Folding</a>.
</p>
</dd>
<dt><samp>-I <var>regexp</var></samp></dt>
<dt><samp>--ignore-matching-lines=<var>regexp</var></samp></dt>
<dd><p>Ignore changes that just insert or delete lines that match <var>regexp</var>.
See <a href="Comparison.html#Specified-Lines">Specified Lines</a>.
</p>
</dd>
<dt><samp>--ignore-file-name-case</samp></dt>
<dd><p>Ignore case when comparing file names. For example, recursive
comparison of <samp>d</samp> to <samp>e</samp> might compare the contents of
<samp>d/Init</samp> and <samp>e/inIt</samp>. At the top level, ‘<samp>diff d inIt</samp>’
might compare the contents of <samp>d/Init</samp> and <samp>inIt</samp>.
See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-l</samp></dt>
<dt><samp>--paginate</samp></dt>
<dd><p>Pass the output through <code>pr</code> to paginate it. See <a href="Adjusting-Output.html#Pagination">Pagination</a>.
</p>
</dd>
<dt><samp>-L <var>label</var></samp></dt>
<dt><samp>--label=<var>label</var></samp></dt>
<dd><p>Use <var>label</var> instead of the file name in the context format
(see <a href="Output-Formats.html#Context-Format">Context Format</a>) and unified format (see <a href="Output-Formats.html#Unified-Format">Unified Format</a>)
headers. See <a href="Output-Formats.html#RCS">RCS</a>.
</p>
</dd>
<dt><samp>--left-column</samp></dt>
<dd><p>Print only the left column of two common lines in side by side format.
See <a href="Output-Formats.html#Side-by-Side-Format">Side by Side Format</a>.
</p>
</dd>
<dt><samp>--line-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output all input lines in if-then-else format.
See <a href="Output-Formats.html#Line-Formats">Line Formats</a>.
</p>
</dd>
<dt><samp>-n</samp></dt>
<dt><samp>--rcs</samp></dt>
<dd><p>Output <acronym>RCS</acronym>-format diffs; like <samp>-f</samp> except that each command
specifies the number of lines affected. See <a href="Output-Formats.html#RCS">RCS</a>.
</p>
</dd>
<dt><samp>-N</samp></dt>
<dt><samp>--new-file</samp></dt>
<dd><p>If one file is missing, treat it as present but empty.
See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>--new-group-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a group of lines taken from just the second
file in if-then-else format. See <a href="Output-Formats.html#Line-Group-Formats">Line Group Formats</a>.
</p>
</dd>
<dt><samp>--new-line-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a line taken from just the second file in
if-then-else format. See <a href="Output-Formats.html#Line-Formats">Line Formats</a>.
</p>
</dd>
<dt><samp>--no-dereference</samp></dt>
<dd><p>Act on symbolic links themselves instead of what they point to.
Two symbolic links are deemed equal only when each points to
precisely the same name.
</p>
</dd>
<dt><samp>--old-group-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a group of lines taken from just the first
file in if-then-else format. See <a href="Output-Formats.html#Line-Group-Formats">Line Group Formats</a>.
</p>
</dd>
<dt><samp>--old-line-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a line taken from just the first file in
if-then-else format. See <a href="Output-Formats.html#Line-Formats">Line Formats</a>.
</p>
</dd>
<dt><samp>-p</samp></dt>
<dt><samp>--show-c-function</samp></dt>
<dd><p>Show which C function each change is in. See <a href="Output-Formats.html#C-Function-Headings">C Function Headings</a>.
</p>
</dd>
<dt><samp>--palette=<var>palette</var></samp></dt>
<dd><p>Specify what color palette to use when colored output is enabled. It
defaults to ‘<samp>rs=0:hd=1:ad=32:de=31:ln=36</samp>’ for red deleted lines,
green added lines, cyan line numbers, bold header.
</p>
<p>Supported capabilities are as follows.
</p>
<dl compact="compact">
<dt><code>ad=32</code></dt>
<dd><a name="index-ad-capability"></a>
<p>SGR substring for added lines.
The default is green foreground.
</p>
</dd>
<dt><code>de=31</code></dt>
<dd><a name="index-de-capability"></a>
<p>SGR substring for deleted lines.
The default is red foreground.
</p>
</dd>
<dt><code>hd=1</code></dt>
<dd><a name="index-hd-capability"></a>
<p>SGR substring for chunk header.
The default is bold foreground.
</p>
</dd>
<dt><code>ln=36</code></dt>
<dd><a name="index-ln-capability"></a>
<p>SGR substring for line numbers.
The default is cyan foreground.
</p></dd>
</dl>
</dd>
<dt><samp>-q</samp></dt>
<dt><samp>--brief</samp></dt>
<dd><p>Report only whether the files differ, not the details of the
differences. See <a href="Comparison.html#Brief">Brief</a>.
</p>
</dd>
<dt><samp>-r</samp></dt>
<dt><samp>--recursive</samp></dt>
<dd><p>When comparing directories, recursively compare any subdirectories
found. See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-s</samp></dt>
<dt><samp>--report-identical-files</samp></dt>
<dd><p>Report when two files are the same. See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-S <var>file</var></samp></dt>
<dt><samp>--starting-file=<var>file</var></samp></dt>
<dd><p>When comparing directories, start with the file <var>file</var>. This is
used for resuming an aborted comparison. See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>--speed-large-files</samp></dt>
<dd><p>Use heuristics to speed handling of large files that have numerous
scattered small changes. See <a href="diff-Performance.html#diff-Performance">diff Performance</a>.
</p>
</dd>
<dt><samp>--strip-trailing-cr</samp></dt>
<dd><p>Strip any trailing carriage return at the end of an input line.
See <a href="Comparison.html#Binary">Binary</a>.
</p>
</dd>
<dt><samp>--suppress-common-lines</samp></dt>
<dd><p>Do not print common lines in side by side format.
See <a href="Output-Formats.html#Side-by-Side-Format">Side by Side Format</a>.
</p>
</dd>
<dt><samp>-t</samp></dt>
<dt><samp>--expand-tabs</samp></dt>
<dd><p>Expand tabs to spaces in the output, to preserve the alignment of tabs
in the input files. See <a href="Adjusting-Output.html#Tabs">Tabs</a>.
</p>
</dd>
<dt><samp>-T</samp></dt>
<dt><samp>--initial-tab</samp></dt>
<dd><p>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. See <a href="Adjusting-Output.html#Tabs">Tabs</a>.
</p>
</dd>
<dt><samp>--tabsize=<var>columns</var></samp></dt>
<dd><p>Assume that tab stops are set every <var>columns</var> (default 8) print
columns. See <a href="Adjusting-Output.html#Tabs">Tabs</a>.
</p>
</dd>
<dt><samp>--suppress-blank-empty</samp></dt>
<dd><p>Suppress any blanks before newlines when printing the representation
of an empty line, when outputting normal, context, or unified format.
See <a href="Adjusting-Output.html#Trailing-Blanks">Trailing Blanks</a>.
</p>
</dd>
<dt><samp>--to-file=<var>file</var></samp></dt>
<dd><p>Compare each operand to <var>file</var>; <var>file</var> may be a directory.
</p>
</dd>
<dt><samp>-u</samp></dt>
<dd><p>Use the unified output format, showing three lines of context.
See <a href="Output-Formats.html#Unified-Format">Unified Format</a>.
</p>
</dd>
<dt><samp>--unchanged-group-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a group of common lines taken from both files
in if-then-else format. See <a href="Output-Formats.html#Line-Group-Formats">Line Group Formats</a>.
</p>
</dd>
<dt><samp>--unchanged-line-format=<var>format</var></samp></dt>
<dd><p>Use <var>format</var> to output a line common to both files in if-then-else
format. See <a href="Output-Formats.html#Line-Formats">Line Formats</a>.
</p>
</dd>
<dt><samp>--unidirectional-new-file</samp></dt>
<dd><p>If a first file is missing, treat it as present but empty.
See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-U <var>lines</var></samp></dt>
<dt><samp>--unified<span class="roman">[</span>=<var>lines</var><span class="roman">]</span></samp></dt>
<dd><p>Use the unified output format, showing <var>lines</var> (an integer) lines of
context, or three if <var>lines</var> is not given. See <a href="Output-Formats.html#Unified-Format">Unified Format</a>.
For proper operation, <code>patch</code> typically needs at least two lines of
context.
</p>
<p>On older systems, <code>diff</code> supports an obsolete option
<samp>-<var>lines</var></samp> that has effect when combined with <samp>-u</samp>.
<acronym>POSIX</acronym> 1003.1-2001 (see <a href="Standards-conformance.html#Standards-conformance">Standards conformance</a>) does not allow
this; use <samp>-U <var>lines</var></samp> instead.
</p>
</dd>
<dt><samp>-v</samp></dt>
<dt><samp>--version</samp></dt>
<dd><p>Output version information and then exit.
</p>
</dd>
<dt><samp>-w</samp></dt>
<dt><samp>--ignore-all-space</samp></dt>
<dd><p>Ignore white space when comparing lines. See <a href="Comparison.html#White-Space">White Space</a>.
</p>
</dd>
<dt><samp>-W <var>columns</var></samp></dt>
<dt><samp>--width=<var>columns</var></samp></dt>
<dd><p>Output at most <var>columns</var> (default 130) print columns per line in
side by side format. See <a href="Output-Formats.html#Side-by-Side-Format">Side by Side Format</a>.
</p>
</dd>
<dt><samp>-x <var>pattern</var></samp></dt>
<dt><samp>--exclude=<var>pattern</var></samp></dt>
<dd><p>When comparing directories, ignore files and subdirectories whose basenames
match <var>pattern</var>. See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-X <var>file</var></samp></dt>
<dt><samp>--exclude-from=<var>file</var></samp></dt>
<dd><p>When comparing directories, ignore files and subdirectories whose basenames
match any pattern contained in <var>file</var>. See <a href="Comparing-Directories.html#Comparing-Directories">Comparing Directories</a>.
</p>
</dd>
<dt><samp>-y</samp></dt>
<dt><samp>--side-by-side</samp></dt>
<dd><p>Use the side by side output format. See <a href="Output-Formats.html#Side-by-Side-Format">Side by Side Format</a>.
</p>
</dd>
<dt><samp>-Z</samp></dt>
<dt><samp>--ignore-trailing-space</samp></dt>
<dd><p>Ignore white space at line end. See <a href="Comparison.html#White-Space">White Space</a>.
</p></dd>
</dl>
<hr>
<div class="header">
<p>
Up: <a href="#Invoking-diff" accesskey="u" rel="up">Invoking diff</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|