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