| 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 | 
|---|
| 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\-r\fR  \fB\-\-recursive\fR | 
|---|
| 158 | Recursively compare any subdirectories found. | 
|---|
| 159 | .TP | 
|---|
| 160 | \fB\-N\fR  \fB\-\-new\-file\fR | 
|---|
| 161 | Treat absent files as empty. | 
|---|
| 162 | .TP | 
|---|
| 163 | \fB\-\-unidirectional\-new\-file\fR | 
|---|
| 164 | Treat absent first files as empty. | 
|---|
| 165 | .TP | 
|---|
| 166 | \fB\-s\fR  \fB\-\-report\-identical\-files\fR | 
|---|
| 167 | Report when two files are the same. | 
|---|
| 168 | .TP | 
|---|
| 169 | \fB\-x\fR PAT  \fB\-\-exclude\fR=\fIPAT\fR | 
|---|
| 170 | Exclude files that match PAT. | 
|---|
| 171 | .TP | 
|---|
| 172 | \fB\-X\fR FILE  \fB\-\-exclude\-from\fR=\fIFILE\fR | 
|---|
| 173 | Exclude files that match any pattern in FILE. | 
|---|
| 174 | .TP | 
|---|
| 175 | \fB\-S\fR FILE  \fB\-\-starting\-file\fR=\fIFILE\fR | 
|---|
| 176 | Start with FILE when comparing directories. | 
|---|
| 177 | .TP | 
|---|
| 178 | \fB\-\-from\-file\fR=\fIFILE1\fR | 
|---|
| 179 | Compare FILE1 to all operands.  FILE1 can be a directory. | 
|---|
| 180 | .TP | 
|---|
| 181 | \fB\-\-to\-file\fR=\fIFILE2\fR | 
|---|
| 182 | Compare all operands to FILE2.  FILE2 can be a directory. | 
|---|
| 183 | .TP | 
|---|
| 184 | \fB\-\-horizon\-lines\fR=\fINUM\fR | 
|---|
| 185 | Keep NUM lines of the common prefix and suffix. | 
|---|
| 186 | .TP | 
|---|
| 187 | \fB\-d\fR  \fB\-\-minimal\fR | 
|---|
| 188 | Try hard to find a smaller set of changes. | 
|---|
| 189 | .TP | 
|---|
| 190 | \fB\-\-speed\-large\-files\fR | 
|---|
| 191 | Assume large files and many scattered small changes. | 
|---|
| 192 | .TP | 
|---|
| 193 | \fB\-v\fR  \fB\-\-version\fR | 
|---|
| 194 | Output version info. | 
|---|
| 195 | .TP | 
|---|
| 196 | \fB\-\-help\fR | 
|---|
| 197 | Output this help. | 
|---|
| 198 | .PP | 
|---|
| 199 | FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'. | 
|---|
| 200 | If \fB\-\-from\-file\fR or \fB\-\-to\-file\fR is given, there are no restrictions on FILES. | 
|---|
| 201 | If a FILE is `-', read standard input. | 
|---|
| 202 | .SH AUTHOR | 
|---|
| 203 | Written by Paul Eggert, Mike Haertel, David Hayes, | 
|---|
| 204 | Richard Stallman, and Len Tower. | 
|---|
| 205 | .SH "REPORTING BUGS" | 
|---|
| 206 | Report bugs to <bug-gnu-utils@gnu.org>. | 
|---|
| 207 | .SH COPYRIGHT | 
|---|
| 208 | Copyright \(co 2002 Free Software Foundation, Inc. | 
|---|
| 209 | .PP | 
|---|
| 210 | This program comes with NO WARRANTY, to the extent permitted by law. | 
|---|
| 211 | You may redistribute copies of this program | 
|---|
| 212 | under the terms of the GNU General Public License. | 
|---|
| 213 | For more information about these matters, see the file named COPYING. | 
|---|
| 214 | .SH "SEE ALSO" | 
|---|
| 215 | The full documentation for | 
|---|
| 216 | .B diff | 
|---|
| 217 | is maintained as a Texinfo manual.  If the | 
|---|
| 218 | .B info | 
|---|
| 219 | and | 
|---|
| 220 | .B diff | 
|---|
| 221 | programs are properly installed at your site, the command | 
|---|
| 222 | .IP | 
|---|
| 223 | .B info diff | 
|---|
| 224 | .PP | 
|---|
| 225 | should give you access to the complete manual. | 
|---|