source: trunk/minix/man/man1/diff.1@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.8 KB
Line 
1.TH DIFF 1
2.SH NAME
3diff \- print differences between two files
4.SH SYNOPSIS
5\fBdiff \fR [\fB\-c \fR|\fB \-e \fR|\fB \-C \fIn\fR\] [\fB\-br\fR]\fIfile1 file2\fR\fR
6.br
7.de FL
8.TP
9\\fB\\$1\\fR
10\\$2
11..
12.de EX
13.TP 20
14\\fB\\$1\\fR
15# \\$2
16..
17.SH OPTIONS
18.FL "\-C \fIn" "Produce output that contains \fIn\fR lines of context"
19.FL "\-b" "Ignore white space when comparing"
20.FL "\-c" "Produce output that contains three lines of context"
21.FL "\-e" "Produce an \fIed\fR-script to convert \fIfile1\fR into \fIfile2\fR"
22.FL "\-r" "Apply \fIdiff\fR recursively to files and directories of the same name, when \fIfile1\fR and \fIfile2\fR are both directories"
23.SH EXAMPLES
24.EX "diff file1 file2" "Print differences between 2 files"
25.EX "diff -C 0 file1 file2" "Same as above"
26.EX "diff -C 3 file1 file2" "Output three lines of context with every difference encountered"
27.EX "diff -c file1 file2" Same as above"
28.EX "diff /etc /dev" "Compares recursively the directories \fI/etc\fR and \fI/dev\fR"
29.EX "diff passwd /etc" "Compares \fI./passwd\fR to \fI/etc/passwd"
30.SH DESCRIPTION
31.PP
32\fIDiff\fR compares two files and generates a list of lines telling how
33the two files differ. Lines may not be longer than 128 characters.
34If the two arguments on the command line are both directories,
35\fIdiff\fR recursively steps through all subdirectories comparing
36files of the same name. If a file name is found only in one directory,
37a diagnostic message is written to \fIstdout\fR. A file that is of
38either block special, character special or FIFO special type, cannot
39be compared to any other file.
40On the other hand, if there is one directory and one file given on the
41command line, \fIdiff\fR tries to compare the file with the same name
42as \fIfile\fR in the directory \fIdirectory\fR.
43.SH "SEE ALSO"
44.BR cdiff (1),
45.BR cmp (1),
46.BR comm (1),
47.BR patch (1).
Note: See TracBrowser for help on using the repository browser.