source: trunk/diffutils/man/diff.1@ 2731

Last change on this file since 2731 was 2556, checked in by bird, 19 years ago

diffutils 2.8.1

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