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