inet6: require RTF_ANNOUNCE to proxy NS
[dragonfly.git] / contrib / diffutils / man / diff.1
blobfc6e21ca4e1486eb3fd734a04bd77e37a13a13e3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
2 .TH GNU "1" "December 2018" "diffutils 3.7" "User Commands"
3 .SH NAME
4 GNU 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 and timestamp
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\-\-no\-dereference\fR
75 don't follow symbolic links
76 .TP
77 \fB\-N\fR, \fB\-\-new\-file\fR
78 treat absent files as empty
79 .TP
80 \fB\-\-unidirectional\-new\-file\fR
81 treat absent first files as empty
82 .TP
83 \fB\-\-ignore\-file\-name\-case\fR
84 ignore case when comparing file names
85 .TP
86 \fB\-\-no\-ignore\-file\-name\-case\fR
87 consider case when comparing file names
88 .TP
89 \fB\-x\fR, \fB\-\-exclude\fR=\fIPAT\fR
90 exclude files that match PAT
91 .TP
92 \fB\-X\fR, \fB\-\-exclude\-from\fR=\fIFILE\fR
93 exclude files that match any pattern in FILE
94 .TP
95 \fB\-S\fR, \fB\-\-starting\-file\fR=\fIFILE\fR
96 start with FILE when comparing directories
97 .TP
98 \fB\-\-from\-file\fR=\fIFILE1\fR
99 compare FILE1 to all operands;
100 FILE1 can be a directory
102 \fB\-\-to\-file\fR=\fIFILE2\fR
103 compare all operands to FILE2;
104 FILE2 can be a directory
106 \fB\-i\fR, \fB\-\-ignore\-case\fR
107 ignore case differences in file contents
109 \fB\-E\fR, \fB\-\-ignore\-tab\-expansion\fR
110 ignore changes due to tab expansion
112 \fB\-Z\fR, \fB\-\-ignore\-trailing\-space\fR
113 ignore white space at line end
115 \fB\-b\fR, \fB\-\-ignore\-space\-change\fR
116 ignore changes in the amount of white space
118 \fB\-w\fR, \fB\-\-ignore\-all\-space\fR
119 ignore all white space
121 \fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
122 ignore changes where lines are all blank
124 \fB\-I\fR, \fB\-\-ignore\-matching\-lines\fR=\fIRE\fR
125 ignore changes where all lines match RE
127 \fB\-a\fR, \fB\-\-text\fR
128 treat all files as text
130 \fB\-\-strip\-trailing\-cr\fR
131 strip trailing carriage return on input
133 \fB\-D\fR, \fB\-\-ifdef\fR=\fINAME\fR
134 output merged file with '#ifdef NAME' diffs
136 \fB\-\-GTYPE\-group\-format\fR=\fIGFMT\fR
137 format GTYPE input groups with GFMT
139 \fB\-\-line\-format\fR=\fILFMT\fR
140 format all input lines with LFMT
142 \fB\-\-LTYPE\-line\-format\fR=\fILFMT\fR
143 format LTYPE input lines with LFMT
145 These format options provide fine\-grained control over the output
147 of diff, generalizing \fB\-D\fR/\-\-ifdef.
149 LTYPE is 'old', 'new', or 'unchanged'.
150 GTYPE is LTYPE or 'changed'.
152 GFMT (only) may contain:
155 lines from FILE1
158 lines from FILE2
161 lines common to FILE1 and FILE2
163 %[\-][WIDTH][.[PREC]]{doxX}LETTER
164 printf\-style spec for LETTER
166 LETTERs are as follows for new group, lower case for old group:
169 first line number
172 last line number
175 number of lines = L\-F+1
178 F\-1
183 %(A=B?T:E)
184 if A equals B then T else E
186 LFMT (only) may contain:
189 contents of line
192 contents of line, excluding any trailing newline
194 %[\-][WIDTH][.[PREC]]{doxX}n
195 printf\-style spec for input line number
197 Both GFMT and LFMT may contain:
202 %c'C'
203 the single character C
205 %c'\eOOO'
206 the character with octal code OOO
209 the character C (other characters represent themselves)
211 \fB\-d\fR, \fB\-\-minimal\fR
212 try hard to find a smaller set of changes
214 \fB\-\-horizon\-lines\fR=\fINUM\fR
215 keep NUM lines of the common prefix and suffix
217 \fB\-\-speed\-large\-files\fR
218 assume large files and many scattered small changes
220 \fB\-\-color\fR[=\fIWHEN\fR]
221 colorize the output; WHEN can be 'never', 'always',
222 or 'auto' (the default)
224 \fB\-\-palette\fR=\fIPALETTE\fR
225 the colors to use when \fB\-\-color\fR is active; PALETTE is
226 a colon\-separated list of terminfo capabilities
228 \fB\-\-help\fR
229 display this help and exit
231 \fB\-v\fR, \fB\-\-version\fR
232 output version information and exit
234 FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'.
235 If \fB\-\-from\-file\fR or \fB\-\-to\-file\fR is given, there are no restrictions on FILE(s).
236 If a FILE is '\-', read standard input.
237 Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
238 .SH AUTHOR
239 Written by Paul Eggert, Mike Haertel, David Hayes,
240 Richard Stallman, and Len Tower.
241 .SH "REPORTING BUGS"
242 Report bugs to: bug\-diffutils@gnu.org
244 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
246 General help using GNU software: <https://www.gnu.org/gethelp/>
247 .SH COPYRIGHT
248 Copyright \(co 2018 Free Software Foundation, Inc.
249 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
251 This is free software: you are free to change and redistribute it.
252 There is NO WARRANTY, to the extent permitted by law.
253 .SH "SEE ALSO"
254 wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)
256 The full documentation for
257 .B GNU
258 is maintained as a Texinfo manual.  If the
259 .B info
261 .B GNU
262 programs are properly installed at your site, the command
264 .B info GNU
266 should give you access to the complete manual.