Go up to Invoking diff.

Options to `diff'
=================

   Below is a summary of all of the options that GNU `diff' accepts.
Most options have two equivalent names, one of which is a single letter
preceded by `-', and the other of which is a long name preceded by
`--'.  Multiple single letter options (unless they take an argument)
can be combined into a single command line word: `-ac' is equivalent to
`-a -c'.  Long named options can be abbreviated to any unique prefix of
their name.  Brackets ([ and ]) indicate that an option takes an
optional argument.

`-LINES'
     Show LINES (an integer) lines of context.  This option does not
     specify an output format by itself; it has no effect unless it is
     combined with `-c' (see Context Format.) or `-u' (
see Unified Format.).  This option is obsolete.  For proper
     operation, `patch' typically needs at least two lines of context.

`-a'
     Treat all files as text and compare them line-by-line, even if they
     do not seem to be text.  See Binary.

`-b'
     Ignore changes in amount of white space.  See White Space.

`-B'
     Ignore changes that just insert or delete blank lines.  
See Blank Lines.

`--binary'
     Read and write data in binary mode.  See Binary.

`--brief'
     Report only whether the files differ, not the details of the
     differences.  See Brief.

`-c'
     Use the context output format.  See Context Format.

`-C LINES'
`--context[=LINES]'
     Use the context output format, showing LINES (an integer) lines of
     context, or three if LINES is not given.  See 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.  See 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.  See If-then-else.

`-e'
`--ed'
     Make output that is a valid `ed' script.  See ed Scripts.

`--exclude=PATTERN'
     When comparing directories, ignore files and subdirectories whose
     basenames match PATTERN.  See 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.  See Tabs.

`-f'
     Make output that looks vaguely like an `ed' script but has changes
     in the order they appear in the file.  See Forward ed.

`-F REGEXP'
     In context and unified format, for each hunk of differences, show
     some of the last preceding line that matches REGEXP.  
See Specified Headings.

`--forward-ed'
     Make output that looks vaguely like an `ed' script but has changes
     in the order they appear in the file.  See Forward ed.

`-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.  See 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.  See diff Performance.

`-i'
     Ignore changes in case; consider upper- and lower-case letters
     equivalent.  See Case Folding.

`-I REGEXP'
     Ignore changes that just insert or delete lines that match REGEXP.
     See Specified Folding.

`--ifdef=NAME'
     Make merged if-then-else output using NAME.  See If-then-else.

`--ignore-all-space'
     Ignore white space when comparing lines.  See White Space.

`--ignore-blank-lines'
     Ignore changes that just insert or delete blank lines.  
See Blank Lines.

`--ignore-case'
     Ignore changes in case; consider upper- and lower-case to be the
     same.  See Case Folding.

`--ignore-matching-lines=REGEXP'
     Ignore changes that just insert or delete lines that match REGEXP.
     See Specified Folding.

`--ignore-space-change'
     Ignore changes in amount of white space.  See 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.  See Tabs.

`-l'
     Pass the output through `pr' to paginate it.  See Pagination.

`-L LABEL'
     Use LABEL instead of the file name in the context format (
see Context Format.) and unified format (see Unified Format.)
     headers.  See RCS.

`--label=LABEL'
     Use LABEL instead of the file name in the context format (
see Context Format.) and unified format (see Unified Format.)
     headers.

`--left-column'
     Print only the left column of two common lines in side by side
     format.  See Side by Side Format.

`--line-format=FORMAT'
     Use FORMAT to output all input lines in if-then-else format.
     See 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.  See 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.  
See 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.  See Line Group Formats.

`--new-line-format=FORMAT'
     Use FORMAT to output a line taken from just the second file in
     if-then-else format.  See 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.  See Line Group Formats.

`--old-line-format=FORMAT'
     Use FORMAT to output a line taken from just the first file in
     if-then-else format.  See 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.
     See Comparing Directories.

`--paginate'
     Pass the output through `pr' to paginate it.  See Pagination.

`-q'
     Report only whether the files differ, not the details of the
     differences.  See Brief.

`-r'
     When comparing directories, recursively compare any subdirectories
     found.  See Comparing Directories.

`--rcs'
     Output RCS-format diffs; like `-f' except that each command
     specifies the number of lines affected.  See RCS.

`--recursive'
     When comparing directories, recursively compare any subdirectories
     found.  See Comparing Directories.

`--report-identical-files'
     Report when two files are the same.  See Comparing Directories.

`-s'
     Report when two files are the same.  See 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.  
See Specified Headings.

`--side-by-side'
     Use the side by side output format.  See Side by Side Format.

`--speed-large-files'
     Use heuristics to speed handling of large files that have numerous
     scattered small changes.  See 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.  See 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.  See Tabs.

`--text'
     Treat all files as text and compare them line-by-line, even if they
     do not appear to be text.  See Binary.

`-u'
     Use the unified output format.  See Unified Format.

`--unchanged-group-format=FORMAT'
     Use FORMAT to output a group of common lines taken from both files
     in if-then-else format.  See Line Group Formats.

`--unchanged-line-format=FORMAT'
     Use FORMAT to output a line common to both files in if-then-else
     format.  See 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.
     See 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.  See 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.  See White Space.

`-W COLUMNS'
`--width=COLUMNS'
     Use an output width of COLUMNS in side by side format.  *Note Side
     by Side Format::.

`-x PATTERN'
     When comparing directories, ignore files and subdirectories whose
     basenames match PATTERN.  See 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.  See Side by Side Format.