DIFF.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:2k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH DIFF 1
- .SH NAME
- diff - print differences between two files
- .SH SYNOPSIS
- fBdiff fR [fB-c fR|fB -e fR|fB -C fInfR] [fB-brfR]fIfile1 file2fRfR
- .br
- .de FL
- .TP
- \fB\$1\fR
- \$2
- ..
- .de EX
- .TP 20
- \fB\$1\fR
- # \$2
- ..
- .SH OPTIONS
- .FL "-C fIn" "Produce output that contains fInfR lines of context"
- .FL "-b" "Ignore white space when comparing"
- .FL "-c" "Produce output that contains three lines of context"
- .FL "-e" "Produce an fIedfR-script to convert fIfile1fR into fIfile2fR"
- .FL "-r" "Apply fIdifffR recursively to files and directories of
- .SH EXAMPLES
- .EX "diff file1 file2" "Print differences between 2 files"
- .EX "diff -C 0 file1 file2" "Same as above"
- .EX "diff -C 3 file1 file2" "Output three lines of context with every
- .EX "diff -c file1 file2" Same as above"
- .EX "diff /etc /dev" "Compares recursively the directories fI/etcfR and fI/devfR"
- .EX "diff passwd /etc" "Compares fI./passwdfR to fI/etc/passwd"
- .SH DESCRIPTION
- the same name, when fIfile1fR and fIfile2fR are both directories"
- difference encountered"
- .PP
- fIDifffR compares two files and generates a list of lines telling how
- the two files differ. Lines may not be longer than 128 characters.
- If the two arguments on the command line are both directories,
- fIdifffR recursively steps through all subdirectories comparing
- files of the same name. If a file name is found only in one directory,
- a diagnostic message is written to fIstdoutfR. A file that is of
- either block special, character special or FIFO special type, cannot
- be compared to any other file.
- On the other hand, if there is one directory and one file given on the
- command line, fIdifffR tries to compare the file with the same name
- as fIfilefR in the directory fIdirectoryfR.
- .SH "SEE ALSO"
- .BR cdiff (1),
- .BR cmp (1),
- .BR comm (1),
- .BR patch (1).