1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33.
2 .TH DIFF "1" "April 2004" "diffutils 2.8.7" "User Commands"
4 diff \- compare files line by line
7 [\fIOPTION\fR]... \fIFILES\fR
9 Compare files line by line.
11 \fB\-i\fR \fB\-\-ignore\-case\fR
12 Ignore case differences in file contents.
14 \fB\-\-ignore\-file\-name\-case\fR
15 Ignore case when comparing file names.
17 \fB\-\-no\-ignore\-file\-name\-case\fR
18 Consider case when comparing file names.
20 \fB\-E\fR \fB\-\-ignore\-tab\-expansion\fR
21 Ignore changes due to tab expansion.
23 \fB\-b\fR \fB\-\-ignore\-space\-change\fR
24 Ignore changes in the amount of white space.
26 \fB\-w\fR \fB\-\-ignore\-all\-space\fR
27 Ignore all white space.
29 \fB\-B\fR \fB\-\-ignore\-blank\-lines\fR
30 Ignore changes whose lines are all blank.
32 \fB\-I\fR RE \fB\-\-ignore\-matching\-lines\fR=\fIRE\fR
33 Ignore changes whose lines all match RE.
35 \fB\-\-strip\-trailing\-cr\fR
36 Strip trailing carriage return on input.
38 \fB\-a\fR \fB\-\-text\fR
39 Treat all files as text.
41 \fB\-c\fR \fB\-C\fR NUM \fB\-\-context\fR[=\fINUM\fR]
42 Output NUM (default 3) lines of copied context.
44 \fB\-u\fR \fB\-U\fR NUM \fB\-\-unified\fR[=\fINUM\fR]
45 Output NUM (default 3) lines of unified context.
48 Use LABEL instead of file name.
50 \fB\-p\fR \fB\-\-show\-c\-function\fR
51 Show which C function each change is in.
53 \fB\-F\fR RE \fB\-\-show\-function\-line\fR=\fIRE\fR
54 Show the most recent line matching RE.
56 \fB\-q\fR \fB\-\-brief\fR
57 Output only whether files differ.
59 \fB\-e\fR \fB\-\-ed\fR
65 \fB\-n\fR \fB\-\-rcs\fR
66 Output an RCS format diff.
68 \fB\-y\fR \fB\-\-side\-by\-side\fR
69 Output in two columns.
71 \fB\-W\fR NUM \fB\-\-width\fR=\fINUM\fR
72 Output at most NUM (default 130) print columns.
74 \fB\-\-left\-column\fR
75 Output only the left column of common lines.
77 \fB\-\-suppress\-common\-lines\fR
78 Do not output common lines.
80 \fB\-D\fR NAME \fB\-\-ifdef\fR=\fINAME\fR
81 Output merged file to show `#ifdef NAME' diffs.
83 \fB\-\-GTYPE\-group\-format\fR=\fIGFMT\fR
84 Similar, but format GTYPE input groups with GFMT.
86 \fB\-\-line\-format\fR=\fILFMT\fR
87 Similar, but format all input lines with LFMT.
89 \fB\-\-LTYPE\-line\-format\fR=\fILFMT\fR
90 Similar, but format LTYPE input lines with LFMT.
92 LTYPE is `old', `new', or `unchanged'.
93 GTYPE is LTYPE or `changed'.
104 lines common to FILE1 and FILE2
106 %[-][WIDTH][.[PREC]]{doxX}LETTER
107 printf-style spec for LETTER
109 LETTERs are as follows for new group, lower case for old group:
118 number of lines = L-F+1
132 contents of line, excluding any trailing newline
134 %[-][WIDTH][.[PREC]]{doxX}n
135 printf-style spec for input line number
137 Either GFMT or LFMT may contain:
143 the single character C
146 the character with octal code OOO
148 \fB\-l\fR \fB\-\-paginate\fR
149 Pass the output through `pr' to paginate it.
151 \fB\-t\fR \fB\-\-expand\-tabs\fR
152 Expand tabs to spaces in output.
154 \fB\-T\fR \fB\-\-initial\-tab\fR
155 Make tabs line up by prepending a tab.
157 \fB\-\-tabsize\fR=\fINUM\fR
158 Tab stops are every NUM (default 8) print columns.
160 \fB\-r\fR \fB\-\-recursive\fR
161 Recursively compare any subdirectories found.
163 \fB\-N\fR \fB\-\-new\-file\fR
164 Treat absent files as empty.
166 \fB\-\-unidirectional\-new\-file\fR
167 Treat absent first files as empty.
169 \fB\-s\fR \fB\-\-report\-identical\-files\fR
170 Report when two files are the same.
172 \fB\-x\fR PAT \fB\-\-exclude\fR=\fIPAT\fR
173 Exclude files that match PAT.
175 \fB\-X\fR FILE \fB\-\-exclude\-from\fR=\fIFILE\fR
176 Exclude files that match any pattern in FILE.
178 \fB\-S\fR FILE \fB\-\-starting\-file\fR=\fIFILE\fR
179 Start with FILE when comparing directories.
181 \fB\-\-from\-file\fR=\fIFILE1\fR
182 Compare FILE1 to all operands. FILE1 can be a directory.
184 \fB\-\-to\-file\fR=\fIFILE2\fR
185 Compare all operands to FILE2. FILE2 can be a directory.
187 \fB\-\-horizon\-lines\fR=\fINUM\fR
188 Keep NUM lines of the common prefix and suffix.
190 \fB\-d\fR \fB\-\-minimal\fR
191 Try hard to find a smaller set of changes.
193 \fB\-\-speed\-large\-files\fR
194 Assume large files and many scattered small changes.
196 \fB\-v\fR \fB\-\-version\fR
202 FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'.
203 If \fB\-\-from\-file\fR or \fB\-\-to\-file\fR is given, there are no restrictions on FILES.
204 If a FILE is `-', read standard input.
205 Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
207 Written by Paul Eggert, Mike Haertel, David Hayes,
208 Richard Stallman, and Len Tower.
210 Report bugs to <bug-gnu-utils@gnu.org>.
212 Copyright \(co 2004 Free Software Foundation, Inc.
214 This is free software; see the source for copying conditions. There is NO
215 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
217 The full documentation for
219 is maintained as a Texinfo manual. If the
223 programs are properly installed at your site, the command
227 should give you access to the complete manual.