Merge branch 'vendor/GCC44'
[dragonfly.git] / contrib / diffutils / man / diff.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.39.2.
2 .TH DIFF "1" "September 2011" "diffutils 3.2" "User Commands"
3 .SH NAME
4 diff \- compare files line by line
5 .SH SYNOPSIS
6 .B diff
7 [\fIOPTION\fR]... \fIFILES\fR
8 .SH DESCRIPTION
9 Compare FILES line by line.
10 .PP
11 Mandatory arguments to long options are mandatory for short options too.
12 .TP
13 \fB\-\-normal\fR
14 output a normal diff (the default)
15 .TP
16 \fB\-q\fR, \fB\-\-brief\fR
17 report only when files differ
18 .TP
19 \fB\-s\fR, \fB\-\-report\-identical\-files\fR
20 report when two files are the same
21 .TP
22 \fB\-c\fR, \fB\-C\fR NUM, \fB\-\-context\fR[=\fINUM\fR]
23 output NUM (default 3) lines of copied context
24 .TP
25 \fB\-u\fR, \fB\-U\fR NUM, \fB\-\-unified\fR[=\fINUM\fR]
26 output NUM (default 3) lines of unified context
27 .TP
28 \fB\-e\fR, \fB\-\-ed\fR
29 output an ed script
30 .TP
31 \fB\-n\fR, \fB\-\-rcs\fR
32 output an RCS format diff
33 .TP
34 \fB\-y\fR, \fB\-\-side\-by\-side\fR
35 output in two columns
36 .TP
37 \fB\-W\fR, \fB\-\-width\fR=\fINUM\fR
38 output at most NUM (default 130) print columns
39 .TP
40 \fB\-\-left\-column\fR
41 output only the left column of common lines
42 .TP
43 \fB\-\-suppress\-common\-lines\fR
44 do not output common lines
45 .TP
46 \fB\-p\fR, \fB\-\-show\-c\-function\fR
47 show which C function each change is in
48 .TP
49 \fB\-F\fR, \fB\-\-show\-function\-line\fR=\fIRE\fR
50 show the most recent line matching RE
51 .TP
52 \fB\-\-label\fR LABEL
53 use LABEL instead of file name
54 (can be repeated)
55 .TP
56 \fB\-t\fR, \fB\-\-expand\-tabs\fR
57 expand tabs to spaces in output
58 .TP
59 \fB\-T\fR, \fB\-\-initial\-tab\fR
60 make tabs line up by prepending a tab
61 .TP
62 \fB\-\-tabsize\fR=\fINUM\fR
63 tab stops every NUM (default 8) print columns
64 .TP
65 \fB\-\-suppress\-blank\-empty\fR
66 suppress space or tab before empty output lines
67 .TP
68 \fB\-l\fR, \fB\-\-paginate\fR
69 pass output through `pr' to paginate it
70 .TP
71 \fB\-r\fR, \fB\-\-recursive\fR
72 recursively compare any subdirectories found
73 .TP
74 \fB\-N\fR, \fB\-\-new\-file\fR
75 treat absent files as empty
76 .TP
77 \fB\-\-unidirectional\-new\-file\fR
78 treat absent first files as empty
79 .TP
80 \fB\-\-ignore\-file\-name\-case\fR
81 ignore case when comparing file names
82 .TP
83 \fB\-\-no\-ignore\-file\-name\-case\fR
84 consider case when comparing file names
85 .TP
86 \fB\-x\fR, \fB\-\-exclude\fR=\fIPAT\fR
87 exclude files that match PAT
88 .TP
89 \fB\-X\fR, \fB\-\-exclude\-from\fR=\fIFILE\fR
90 exclude files that match any pattern in FILE
91 .TP
92 \fB\-S\fR, \fB\-\-starting\-file\fR=\fIFILE\fR
93 start with FILE when comparing directories
94 .TP
95 \fB\-\-from\-file\fR=\fIFILE1\fR
96 compare FILE1 to all operands;
97 FILE1 can be a directory
98 .TP
99 \fB\-\-to\-file\fR=\fIFILE2\fR
100 compare all operands to FILE2;
101 FILE2 can be a directory
102 .TP
103 \fB\-i\fR, \fB\-\-ignore\-case\fR
104 ignore case differences in file contents
105 .TP
106 \fB\-E\fR, \fB\-\-ignore\-tab\-expansion\fR
107 ignore changes due to tab expansion
108 .TP
109 \fB\-b\fR, \fB\-\-ignore\-space\-change\fR
110 ignore changes in the amount of white space
111 .TP
112 \fB\-w\fR, \fB\-\-ignore\-all\-space\fR
113 ignore all white space
114 .TP
115 \fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
116 ignore changes whose lines are all blank
117 .TP
118 \fB\-I\fR, \fB\-\-ignore\-matching\-lines\fR=\fIRE\fR
119 ignore changes whose lines all match RE
120 .TP
121 \fB\-a\fR, \fB\-\-text\fR
122 treat all files as text
123 .TP
124 \fB\-\-strip\-trailing\-cr\fR
125 strip trailing carriage return on input
126 .TP
127 \fB\-D\fR, \fB\-\-ifdef\fR=\fINAME\fR
128 output merged file with `#ifdef NAME' diffs
129 .TP
130 \fB\-\-GTYPE\-group\-format\fR=\fIGFMT\fR
131 format GTYPE input groups with GFMT
132 .TP
133 \fB\-\-line\-format\fR=\fILFMT\fR
134 format all input lines with LFMT
135 .TP
136 \fB\-\-LTYPE\-line\-format\fR=\fILFMT\fR
137 format LTYPE input lines with LFMT
138 .IP
139 These format options provide fine\-grained control over the output
140 .IP
141 of diff, generalizing \fB\-D\fR/\-\-ifdef.
142 .TP
143 LTYPE is `old', `new', or `unchanged'.
144 GTYPE is LTYPE or `changed'.
145 .IP
146 GFMT (only) may contain:
147 .TP
148 %<
149 lines from FILE1
150 .TP
151 %>
152 lines from FILE2
153 .TP
154 %=
155 lines common to FILE1 and FILE2
156 .TP
157 %[\-][WIDTH][.[PREC]]{doxX}LETTER
158 printf\-style spec for LETTER
159 .IP
160 LETTERs are as follows for new group, lower case for old group:
161 .TP
162 F
163 first line number
164 .TP
165 L
166 last line number
167 .TP
168 N
169 number of lines = L\-F+1
170 .TP
171 E
172 F\-1
173 .TP
174 M
175 L+1
176 .TP
177 %(A=B?T:E)
178 if A equals B then T else E
179 .IP
180 LFMT (only) may contain:
181 .TP
182 %L
183 contents of line
184 .TP
185 %l
186 contents of line, excluding any trailing newline
187 .TP
188 %[\-][WIDTH][.[PREC]]{doxX}n
189 printf\-style spec for input line number
190 .IP
191 Both GFMT and LFMT may contain:
192 .TP
193 %%
194 %
195 .TP
196 %c'C'
197 the single character C
198 .TP
199 %c'\eOOO'
200 the character with octal code OOO
201 .TP
202 C
203 the character C (other characters represent themselves)
204 .TP
205 \fB\-d\fR, \fB\-\-minimal\fR
206 try hard to find a smaller set of changes
207 .TP
208 \fB\-\-horizon\-lines\fR=\fINUM\fR
209 keep NUM lines of the common prefix and suffix
210 .TP
211 \fB\-\-speed\-large\-files\fR
212 assume large files and many scattered small changes
213 .TP
214 \fB\-\-help\fR
215 display this help and exit
216 .TP
217 \fB\-v\fR, \fB\-\-version\fR
218 output version information and exit
219 .PP
220 FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'.
221 If \fB\-\-from\-file\fR or \fB\-\-to\-file\fR is given, there are no restrictions on FILE(s).
222 If a FILE is `\-', read standard input.
223 Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
224 .SH AUTHOR
225 Written by Paul Eggert, Mike Haertel, David Hayes,
226 Richard Stallman, and Len Tower.
227 .SH "REPORTING BUGS"
228 Report bugs to: bug\-diffutils@gnu.org
229 .br
230 GNU diffutils home page: <http://www.gnu.org/software/diffutils/>
231 .br
232 General help using GNU software: <http://www.gnu.org/gethelp/>
233 .SH COPYRIGHT
234 Copyright \(co 2011 Free Software Foundation, Inc.
235 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
236 .br
237 This is free software: you are free to change and redistribute it.
238 There is NO WARRANTY, to the extent permitted by law.
239 .SH "SEE ALSO"
240 wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)
241 .PP
242 The full documentation for
243 .B diff
244 is maintained as a Texinfo manual.  If the
245 .B info
246 and
247 .B diff
248 programs are properly installed at your site, the command
249 .IP
250 .B info diff
251 .PP
252 should give you access to the complete manual.