version 1.25, 2004/03/16 00:40:34 |
version 1.26, 2004/06/20 18:47:45 |
|
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm diff |
.Nm diff |
.Op Fl abdilpqtTw |
.Op Fl abdilpqtTw |
|
.Op Fl I Ar pattern |
.Oo |
.Oo |
.Fl c | Fl e | Fl f | |
.Fl c | e | f | |
.Fl n | Fl u |
.Fl n | u |
.Oc |
.Oc |
.Op Fl L Ar label |
.Op Fl L Ar label |
.Ar file1 file2 |
.Ar file1 file2 |
.Nm diff |
.Nm diff |
.Op Fl abdilpqtTw |
.Op Fl abdilpqtTw |
|
.Op Fl I Ar pattern |
.Op Fl L Ar label |
.Op Fl L Ar label |
.Fl C Ar number |
.Fl C Ar number |
.Ar file1 file2 |
.Ar file1 file2 |
.Nm diff |
.Nm diff |
.Op Fl abdilqtw |
.Op Fl abdilqtw |
|
.Op Fl I Ar pattern |
.Fl D Ar string |
.Fl D Ar string |
.Ar file1 file2 |
.Ar file1 file2 |
.Nm diff |
.Nm diff |
.Op Fl abdilpqtTw |
.Op Fl abdilpqtTw |
|
.Op Fl I Ar pattern |
.Op Fl L Ar label |
.Op Fl L Ar label |
.Fl U Ar number |
.Fl U Ar number |
.Ar file1 file2 |
.Ar file1 file2 |
.Nm diff |
.Nm diff |
.Op Fl abdilNPpqtTw |
.Op Fl abdilNPpqtTw |
|
.Op Fl I Ar pattern |
.Oo |
.Oo |
.Fl c | Fl e | Fl f | |
.Fl c | e | f | |
.Fl n | Fl u |
.Fl n | u |
.Oc |
.Oc |
.Bk -words |
.Bk -words |
.Op Fl L Ar label |
.Op Fl L Ar label |
|
|
the output format is modified slightly: |
the output format is modified slightly: |
the output begins with identification of the files involved and |
the output begins with identification of the files involved and |
their creation dates and then each change is separated |
their creation dates and then each change is separated |
by a line with fifteen *'s. |
by a line with fifteen |
|
.Li * Ns 's . |
The lines removed from |
The lines removed from |
.Ar file1 |
.Ar file1 |
are marked with |
are marked with |
.Sq \-\ \& ; |
.Sq \&-\ \& ; |
those added to |
those added to |
.Ar file2 |
.Ar file2 |
are marked |
are marked |
|
|
Comparison options: |
Comparison options: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl a |
.It Fl a |
Treat all files as ASCII. |
Treat all files as |
|
.Tn ASCII . |
.It Fl b |
.It Fl b |
Causes trailing blanks (spaces and tabs) to be ignored, and other |
Causes trailing blanks (spaces and tabs) to be ignored, and other |
strings of blanks to compare equal. |
strings of blanks to compare equal. |
|
|
Try very hard to produce a diff as small as possible. |
Try very hard to produce a diff as small as possible. |
This may consume a lot of processing power and memory when processing |
This may consume a lot of processing power and memory when processing |
large files with many changes. |
large files with many changes. |
|
.It Fl I Ar pattern |
|
Ignores changes, insertions, and deletions whose lines match the |
|
extended regular expression |
|
.Ar pattern . |
|
Multiple |
|
.Fl I |
|
patterns may be specified. |
|
All lines in the change must match some pattern for the change to be |
|
ignored. |
|
See |
|
.Xr re_format 7 |
|
for more information on regular expression patterns. |
.It Fl i |
.It Fl i |
Ignores the case of letters. |
Ignores the case of letters. |
E.g., |
E.g., |
|
|
common subdirectories, and files which appear in only one directory |
common subdirectories, and files which appear in only one directory |
are described as such. |
are described as such. |
In directory mode only regular files and directories are compared. |
In directory mode only regular files and directories are compared. |
If a non-regular file such as a device special file or FIFO is |
If a non-regular file such as a device special file or |
encountered, a diagnostic message is printed. |
.Tn FIFO |
|
is encountered, a diagnostic message is printed. |
.Pp |
.Pp |
If only one of |
If only one of |
.Ar file1 |
.Ar file1 |
|
|
.Va ZZ . |
.Va ZZ . |
.It Li XX,YY Ns Ic c Ns Li ZZ,QQ |
.It Li XX,YY Ns Ic c Ns Li ZZ,QQ |
Replace the range |
Replace the range |
.Va XX , Ns YY |
.Va XX , Ns Va YY |
from |
from |
.Ar file1 |
.Ar file1 |
with the range |
with the range |
.Va ZZ , Ns QQ |
.Va ZZ , Ns Va QQ |
from |
from |
.Ar file2 . |
.Ar file2 . |
.El |
.El |
|
|
.El |
.El |
.Sh FILES |
.Sh FILES |
.Bl -tag -width /tmp/diff.XXXXXXXX -compact |
.Bl -tag -width /tmp/diff.XXXXXXXX -compact |
.It Pa /tmp/diff.XXXXXXXX |
.It Pa /tmp/diff. Ns Ar XXXXXXXX |
Temporary file used when comparing a device or the standard input. |
Temporary file used when comparing a device or the standard input. |
Note that the temporary file is unlinked as soon as it is created |
Note that the temporary file is unlinked as soon as it is created |
so it will not show up in a directory listing. |
so it will not show up in a directory listing. |
|
|
.Xr diff3 1 , |
.Xr diff3 1 , |
.Xr ed 1 , |
.Xr ed 1 , |
.Xr pr 1 , |
.Xr pr 1 , |
.Xr fnmatch 3 |
.Xr fnmatch 3 , |
|
.Xr re_format 7 |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Nm |
.Nm |