]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/diff/man/diff.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / diff / man / diff.1
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"
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\-r\fR  \fB\-\-recursive\fR
161 Recursively compare any subdirectories found.
162 .TP
163 \fB\-N\fR  \fB\-\-new\-file\fR
164 Treat absent files as empty.
165 .TP
166 \fB\-\-unidirectional\-new\-file\fR
167 Treat absent first files as empty.
168 .TP
169 \fB\-s\fR  \fB\-\-report\-identical\-files\fR
170 Report when two files are the same.
171 .TP
172 \fB\-x\fR PAT  \fB\-\-exclude\fR=\fIPAT\fR
173 Exclude files that match PAT.
174 .TP
175 \fB\-X\fR FILE  \fB\-\-exclude\-from\fR=\fIFILE\fR
176 Exclude files that match any pattern in FILE.
177 .TP
178 \fB\-S\fR FILE  \fB\-\-starting\-file\fR=\fIFILE\fR
179 Start with FILE when comparing directories.
180 .TP
181 \fB\-\-from\-file\fR=\fIFILE1\fR
182 Compare FILE1 to all operands.  FILE1 can be a directory.
183 .TP
184 \fB\-\-to\-file\fR=\fIFILE2\fR
185 Compare all operands to FILE2.  FILE2 can be a directory.
186 .TP
187 \fB\-\-horizon\-lines\fR=\fINUM\fR
188 Keep NUM lines of the common prefix and suffix.
189 .TP
190 \fB\-d\fR  \fB\-\-minimal\fR
191 Try hard to find a smaller set of changes.
192 .TP
193 \fB\-\-speed\-large\-files\fR
194 Assume large files and many scattered small changes.
195 .TP
196 \fB\-v\fR  \fB\-\-version\fR
197 Output version info.
198 .TP
199 \fB\-\-help\fR
200 Output this help.
201 .PP
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.
206 .SH AUTHOR
207 Written by Paul Eggert, Mike Haertel, David Hayes,
208 Richard Stallman, and Len Tower.
209 .SH "REPORTING BUGS"
210 Report bugs to <bug-gnu-utils@gnu.org>.
211 .SH COPYRIGHT
212 Copyright \(co 2004 Free Software Foundation, Inc.
213 .br
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.
216 .SH "SEE ALSO"
217 The full documentation for
218 .B diff
219 is maintained as a Texinfo manual.  If the
220 .B info
221 and
222 .B diff
223 programs are properly installed at your site, the command
224 .IP
225 .B info diff
226 .PP
227 should give you access to the complete manual.