?? diff.1
字號:
.TH DIFF 1 .SH NAMEdiff \- differential file comparator.SH SYNOPSIS.B diff[.B \-efbh] file1 file2.SH DESCRIPTION.I Difftells what lines must be changed in two files to bring theminto agreement.If.I file1.RI ( file2 )is `\-', the standard input is used.If.I file1.RI ( file2 )is a directory, then a file in that directorywhose file-name is the same as the file-name of .I file2.RI ( file1 )is used.The normal output contains lines of these forms:.IP "" 5.I n1a.I n3,n4.br.I n1,n2d.I n3.br.I n1,n2c.I n3,n4.PPThese lines resemble.I edcommands to convert.I file1into.IR file2 .The numbers after the letters pertain to.IR file2 .In fact, by exchanging `a' for `d' and reading backwardone may ascertain equally how to convert .I file2into.IR file1 .As in .I ed,identical pairs where.I n1=.I n2or.I n3=.I n4are abbreviated as a single number..PPFollowing each of these lines come all the lines that areaffected in the first file flagged by `<', then all the lines that are affected in the second fileflagged by `>'..PPThe.B \-boption causestrailing blanks (spaces and tabs) to be ignoredand other strings of blanks to compare equal..PPThe.B \-eoption produces a script of.I "a, c"and .I dcommands for the editor.I ed,which will recreate.I file2from.IR file1 .The.B \-foption produces a similar script,not useful with.I ed,in the opposite order.In connection with.BR \-e ,the following shell program may help maintainmultiple versions of a file.Only an ancestral file ($1) and a chain of version-to-version.I edscripts ($2,$3,...) made by.I diffneed be on hand.A `latest version' appears onthe standard output..IP "" 5(shift; cat $*; echo \'1,$p\') \(bv ed \- $1.PPExcept in rare circumstances,.I difffinds a smallest sufficient set of filedifferences..PPOption.B \-hdoes a fast, half-hearted job.It works only when changed stretches are shortand well separated,but does work on files of unlimited length.Options .B \-eand.B \-fare unavailable with.BR \-h ..SH FILES/tmp/d?????.br/usr/lib/diffh for .B \-h.SH "SEE ALSO"cmp(1), comm(1), ed(1).SH DIAGNOSTICSExit status is 0 for no differences, 1 for some, 2 for trouble..SH BUGSEditing scripts produced under the.BR \-e " or".BR \-f " option are naive about"creating lines consisting of a single `\fB.\fR'.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -