Merge branch 'vendor/MDOCML'
[dragonfly.git] / contrib / diffutils / man / diff.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
2 .TH DIFF "1" "March 2013" "diffutils 3.3" "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\-Z\fR, \fB\-\-ignore\-trailing\-space\fR
110 ignore white space at line end
111 .TP
112 \fB\-b\fR, \fB\-\-ignore\-space\-change\fR
113 ignore changes in the amount of white space
114 .TP
115 \fB\-w\fR, \fB\-\-ignore\-all\-space\fR
116 ignore all white space
117 .TP
118 \fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
119 ignore changes whose lines are all blank
120 .TP
121 \fB\-I\fR, \fB\-\-ignore\-matching\-lines\fR=\fIRE\fR
122 ignore changes whose lines all match RE
123 .TP
124 \fB\-a\fR, \fB\-\-text\fR
125 treat all files as text
126 .TP
127 \fB\-\-strip\-trailing\-cr\fR
128 strip trailing carriage return on input
129 .TP
130 \fB\-D\fR, \fB\-\-ifdef\fR=\fINAME\fR
131 output merged file with `#ifdef NAME' diffs
132 .TP
133 \fB\-\-GTYPE\-group\-format\fR=\fIGFMT\fR
134 format GTYPE input groups with GFMT
135 .TP
136 \fB\-\-line\-format\fR=\fILFMT\fR
137 format all input lines with LFMT
138 .TP
139 \fB\-\-LTYPE\-line\-format\fR=\fILFMT\fR
140 format LTYPE input lines with LFMT
141 .IP
142 These format options provide fine\-grained control over the output
143 .IP
144 of diff, generalizing \fB\-D\fR/\-\-ifdef.
145 .TP
146 LTYPE is `old', `new', or `unchanged'.
147 GTYPE is LTYPE or `changed'.
148 .IP
149 GFMT (only) may contain:
150 .TP
151 %<
152 lines from FILE1
153 .TP
154 %>
155 lines from FILE2
156 .TP
157 %=
158 lines common to FILE1 and FILE2
159 .TP
160 %[\-][WIDTH][.[PREC]]{doxX}LETTER
161 printf\-style spec for LETTER
162 .IP
163 LETTERs are as follows for new group, lower case for old group:
164 .TP
165 F
166 first line number
167 .TP
168 L
169 last line number
170 .TP
171 N
172 number of lines = L\-F+1
173 .TP
174 E
175 F\-1
176 .TP
177 M
178 L+1
179 .TP
180 %(A=B?T:E)
181 if A equals B then T else E
182 .IP
183 LFMT (only) may contain:
184 .TP
185 %L
186 contents of line
187 .TP
188 %l
189 contents of line, excluding any trailing newline
190 .TP
191 %[\-][WIDTH][.[PREC]]{doxX}n
192 printf\-style spec for input line number
193 .IP
194 Both GFMT and LFMT may contain:
195 .TP
196 %%
197 %
198 .TP
199 %c'C'
200 the single character C
201 .TP
202 %c'\eOOO'
203 the character with octal code OOO
204 .TP
205 C
206 the character C (other characters represent themselves)
207 .TP
208 \fB\-d\fR, \fB\-\-minimal\fR
209 try hard to find a smaller set of changes
210 .TP
211 \fB\-\-horizon\-lines\fR=\fINUM\fR
212 keep NUM lines of the common prefix and suffix
213 .TP
214 \fB\-\-speed\-large\-files\fR
215 assume large files and many scattered small changes
216 .TP
217 \fB\-\-help\fR
218 display this help and exit
219 .TP
220 \fB\-v\fR, \fB\-\-version\fR
221 output version information and exit
222 .PP
223 FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'.
224 If \fB\-\-from\-file\fR or \fB\-\-to\-file\fR is given, there are no restrictions on FILE(s).
225 If a FILE is `\-', read standard input.
226 Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
227 .SH AUTHOR
228 Written by Paul Eggert, Mike Haertel, David Hayes,
229 Richard Stallman, and Len Tower.
230 .SH "REPORTING BUGS"
231 Report bugs to: bug\-diffutils@gnu.org
232 .br
233 GNU diffutils home page: <http://www.gnu.org/software/diffutils/>
234 .br
235 General help using GNU software: <http://www.gnu.org/gethelp/>
236 .SH COPYRIGHT
237 Copyright \(co 2011 Free Software Foundation, Inc.
238 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
239 .br
240 This is free software: you are free to change and redistribute it.
241 There is NO WARRANTY, to the extent permitted by law.
242 .SH "SEE ALSO"
243 wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)
244 .PP
245 The full documentation for
246 .B diff
247 is maintained as a Texinfo manual.  If the
248 .B info
249 and
250 .B diff
251 programs are properly installed at your site, the command
252 .IP
253 .B info diff
254 .PP
255 should give you access to the complete manual.