(cvs.info.gz) diff options
Info Catalog
(cvs.info.gz) diff
(cvs.info.gz) diff examples
A.11.1 diff options
-------------------
These standard options are supported by `diff' ( Common options,
for a complete description of them):
`-D DATE'
Use the most recent revision no later than DATE. See `-r' for how
this affects the comparison.
`-k KFLAG'
Process keywords according to KFLAG. See Keyword
substitution.
`-l'
Local; run only in current working directory.
`-R'
Examine directories recursively. This option is on by default.
`-r TAG[:DATE]'
Compare with revision specified by TAG or, when DATE is specified
and TAG is a branch tag, the version from the branch TAG as it
existed on DATE. Zero, one or two `-r' options can be present.
With no `-r' option, the working file will be compared with the
revision it was based on. With one `-r', that revision will be
compared to your current working file. With two `-r' options
those two revisions will be compared (and your working file will
not affect the outcome in any way).
One or both `-r' options can be replaced by a `-D DATE' option,
described above.
The following options specify the format of the output. They have
the same meaning as in GNU diff. 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 `--'.
`-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' or `-u'. 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.
`-b'
Ignore trailing white space and consider all other sequences of
one or more white space characters to be equivalent.
`-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.
`-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. 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. Line group formats.
`-d'
Change the algorithm to perhaps find a smaller set of changes.
This makes `diff' slower (sometimes much slower).
`-e'
`--ed'
Make output that is a valid `ed' script.
`--expand-tabs'
Expand tabs to spaces in the output, to preserve the alignment of
tabs in the input files.
`-f'
Make output that looks vaguely like an `ed' script but has changes
in the order they appear in the file.
`-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'
Use heuristics to speed handling of large files that have numerous
scattered small changes.
`--horizon-lines=LINES'
Do not discard the last LINES lines of the common prefix and the
first LINES lines of the common suffix.
`-i'
Ignore changes in case; consider upper- and lower-case letters
equivalent.
`-I REGEXP'
Ignore changes that just insert or delete lines that match REGEXP.
`--ifdef=NAME'
Make merged if-then-else output using NAME.
`--ignore-all-space'
Ignore white space when comparing lines.
`--ignore-blank-lines'
Ignore changes that just insert or delete blank lines.
`--ignore-case'
Ignore changes in case; consider upper- and lower-case to be the
same.
`--ignore-matching-lines=REGEXP'
Ignore changes that just insert or delete lines that match REGEXP.
`--ignore-space-change'
Ignore trailing white space and consider all other sequences of
one or more white space characters to be equivalent.
`--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.
`-L LABEL'
Use LABEL instead of the file name in the context format and
unified format headers.
`--label=LABEL'
Use LABEL instead of the file name in the context format and
unified format headers.
`--left-column'
Print only the left column of two common lines in side by side
format.
`--line-format=FORMAT'
Use FORMAT to output all input lines in if-then-else format.
Line formats.
`--minimal'
Change the algorithm to perhaps find a smaller set of changes.
This makes `diff' slower (sometimes much slower).
`-n'
Output RCS-format diffs; like `-f' except that each command
specifies the number of lines affected.
`-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.
`--new-group-format=FORMAT'
Use FORMAT to output a group of lines taken from just the second
file in if-then-else format. Line group formats.
`--new-line-format=FORMAT'
Use FORMAT to output a line taken from just the second file in
if-then-else format. 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. Line group formats.
`--old-line-format=FORMAT'
Use FORMAT to output a line taken from just the first file in
if-then-else format. Line formats.
`-p'
Show which C function each change is in.
`--rcs'
Output RCS-format diffs; like `-f' except that each command
specifies the number of lines affected.
`--report-identical-files'
`-s'
Report when two files are the same.
`--show-c-function'
Show which C function each change is in.
`--show-function-line=REGEXP'
In context and unified format, for each hunk of differences, show
some of the last preceding line that matches REGEXP.
`--side-by-side'
Use the side by side output format.
`--speed-large-files'
Use heuristics to speed handling of large files that have numerous
scattered small changes.
`--suppress-common-lines'
Do not print common lines in side by side format.
`-t'
Expand tabs to spaces in the output, to preserve the alignment of
tabs in the input files.
`-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.
`--text'
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.
`-u'
Use the unified output format.
`--unchanged-group-format=FORMAT'
Use FORMAT to output a group of common lines taken from both files
in if-then-else format. Line group formats.
`--unchanged-line-format=FORMAT'
Use FORMAT to output a line common to both files in if-then-else
format. Line formats.
`-U LINES'
`--unified[=LINES]'
Use the unified output format, showing LINES (an integer) lines of
context, or three if LINES is not given. For proper operation,
`patch' typically needs at least two lines of context.
`-w'
Ignore white space when comparing lines.
`-W COLUMNS'
`--width=COLUMNS'
Use an output width of COLUMNS in side by side format.
`-y'
Use the side by side output format.
Menu
* Line group formats Line group formats
* Line formats Line formats
Info Catalog
(cvs.info.gz) diff
(cvs.info.gz) diff examples
automatically generated byinfo2html