xref: /openbsd-src/usr.bin/diff/diff.1 (revision 394d9b5a8b0e149b6ca1f8ee27cab94db69bc528)
1*394d9b5aSjmc.\" $OpenBSD: diff.1,v 1.52 2024/12/03 07:09:14 jmc Exp $
2522b32d6Smillert.\"
3c3cd0760Sderaadt.\" Copyright (c) 1980, 1990, 1993
4c3cd0760Sderaadt.\"	The Regents of the University of California.  All rights reserved.
5ae8d569bSderaadt.\"
6c3cd0760Sderaadt.\" Redistribution and use in source and binary forms, with or without
7c3cd0760Sderaadt.\" modification, are permitted provided that the following conditions
8c3cd0760Sderaadt.\" are met:
9c3cd0760Sderaadt.\" 1. Redistributions of source code must retain the above copyright
10c3cd0760Sderaadt.\"    notice, this list of conditions and the following disclaimer.
11c3cd0760Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright
12c3cd0760Sderaadt.\"    notice, this list of conditions and the following disclaimer in the
13c3cd0760Sderaadt.\"    documentation and/or other materials provided with the distribution.
147a7713b6Sderaadt.\" 3. Neither the name of the University nor the names of its contributors
15c3cd0760Sderaadt.\"    may be used to endorse or promote products derived from this software
16c3cd0760Sderaadt.\"    without specific prior written permission.
17ae8d569bSderaadt.\"
18c3cd0760Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19c3cd0760Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20c3cd0760Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21c3cd0760Sderaadt.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22c3cd0760Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23c3cd0760Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24c3cd0760Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25c3cd0760Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26c3cd0760Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27c3cd0760Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28c3cd0760Sderaadt.\" SUCH DAMAGE.
29ae8d569bSderaadt.\"
30c3cd0760Sderaadt.\"     @(#)diff.1	8.1 (Berkeley) 6/30/93
31c3cd0760Sderaadt.\"
32*394d9b5aSjmc.Dd $Mdocdate: December 3 2024 $
33ae8d569bSderaadt.Dt DIFF 1
34f4ff8ff1Sjmc.Os
35ae8d569bSderaadt.Sh NAME
36ae8d569bSderaadt.Nm diff
37ae8d569bSderaadt.Nd differential file and directory comparator
38ae8d569bSderaadt.Sh SYNOPSIS
39ae8d569bSderaadt.Nm diff
4040e7295bSmillert.Op Fl abdipTtw
41522b32d6Smillert.Oo
42ccd55a2cSotto.Fl c | e | f |
439d40d95cSsobrado.Fl n | q | u
44522b32d6Smillert.Oc
451a1f5fe3Ssobrado.Op Fl I Ar pattern
461f9aa9e0Smillert.Op Fl L Ar label
471f9aa9e0Smillert.Ar file1 file2
481f9aa9e0Smillert.Nm diff
49998894f5Smillert.Op Fl abdipTtw
50ccd55a2cSotto.Op Fl I Ar pattern
511f9aa9e0Smillert.Op Fl L Ar label
521f9aa9e0Smillert.Fl C Ar number
53ae8d569bSderaadt.Ar file1 file2
54ae8d569bSderaadt.Nm diff
55998894f5Smillert.Op Fl abditw
56ccd55a2cSotto.Op Fl I Ar pattern
571f9aa9e0Smillert.Fl D Ar string
58ae8d569bSderaadt.Ar file1 file2
59ae8d569bSderaadt.Nm diff
60998894f5Smillert.Op Fl abdipTtw
61ccd55a2cSotto.Op Fl I Ar pattern
621f9aa9e0Smillert.Op Fl L Ar label
631f9aa9e0Smillert.Fl U Ar number
64522b32d6Smillert.Ar file1 file2
65522b32d6Smillert.Nm diff
66998894f5Smillert.Op Fl abdiNPprsTtw
67522b32d6Smillert.Oo
68ccd55a2cSotto.Fl c | e | f |
699d40d95cSsobrado.Fl n | q | u
70522b32d6Smillert.Oc
711a1f5fe3Ssobrado.Op Fl I Ar pattern
724ec4b3d5Smillert.Bk -words
731f9aa9e0Smillert.Op Fl L Ar label
74522b32d6Smillert.Op Fl S Ar name
754ec4b3d5Smillert.Op Fl X Ar file
764ec4b3d5Smillert.Op Fl x Ar pattern
774ec4b3d5Smillert.Ek
78ae8d569bSderaadt.Ar dir1 dir2
79ae8d569bSderaadt.Sh DESCRIPTION
80ae8d569bSderaadtThe
81f4ff8ff1Sjmc.Nm
82ae8d569bSderaadtutility compares the contents of
83ae8d569bSderaadt.Ar file1
84ae8d569bSderaadtand
85ae8d569bSderaadt.Ar file2
86ae8d569bSderaadtand writes to the standard output the list of changes necessary to
87ae8d569bSderaadtconvert one file into the other.
88ae8d569bSderaadtNo output is produced if the files are identical.
89ae8d569bSderaadt.Pp
9061e76687SjmcOutput options (mutually exclusive):
91c3cd0760Sderaadt.Bl -tag -width Ds
92d4b26a09Sjmc.It Fl C Ar number
93d4b26a09SjmcLike
94d4b26a09Sjmc.Fl c
95d4b26a09Sjmcbut produces a diff with
96d4b26a09Sjmc.Ar number
97d4b26a09Sjmclines of context.
98c3cd0760Sderaadt.It Fl c
99522b32d6SmillertProduces a diff with 3 lines of context.
100ae8d569bSderaadtWith
101ae8d569bSderaadt.Fl c
102ae8d569bSderaadtthe output format is modified slightly:
103f5537e38Sjmcthe output begins with identification of the files involved and
104ae8d569bSderaadttheir creation dates and then each change is separated
105ccd55a2cSottoby a line with fifteen
106ccd55a2cSotto.Li * Ns 's .
107ae8d569bSderaadtThe lines removed from
108ae8d569bSderaadt.Ar file1
109f4ff8ff1Sjmcare marked with
1107ce2854cSschwarze.Sq \-\ \& ;
111f4ff8ff1Sjmcthose added to
112ae8d569bSderaadt.Ar file2
113f4ff8ff1Sjmcare marked
1147ce2854cSschwarze.Sq +\ \& .
115f4ff8ff1SjmcLines which are changed from one file to the other are marked in
116f4ff8ff1Sjmcboth files with
117f4ff8ff1Sjmc.Sq !\ \& .
1186e18f850SottoChanges which lie within 3 lines of each other are grouped together on
1196e18f850Sottooutput.
120d4b26a09Sjmc.It Fl D Ar string
121d4b26a09SjmcCreates a merged version of
122d4b26a09Sjmc.Ar file1
123d4b26a09Sjmcand
124d4b26a09Sjmc.Ar file2
125d4b26a09Sjmcon the standard output, with C preprocessor controls included so that
126d4b26a09Sjmca compilation of the result without defining
127d4b26a09Sjmc.Ar string
128d4b26a09Sjmcis equivalent to compiling
129d4b26a09Sjmc.Ar file1 ,
130d4b26a09Sjmcwhile defining
131d4b26a09Sjmc.Ar string
132d4b26a09Sjmcwill yield
133d4b26a09Sjmc.Ar file2 .
134c3cd0760Sderaadt.It Fl e
135f4ff8ff1SjmcProduces output in a form suitable as input for the editor utility,
136ae8d569bSderaadt.Xr ed 1 ,
137ae8d569bSderaadtwhich can then be used to convert file1 into file2.
138ae8d569bSderaadt.Pp
139ae8d569bSderaadtExtra commands are added to the output when comparing directories with
140ae8d569bSderaadt.Fl e ,
141ae8d569bSderaadtso that the result is a
142ae8d569bSderaadt.Xr sh 1
143ae8d569bSderaadtscript for converting text files which are common to the two directories
144ae8d569bSderaadtfrom their state in
145ae8d569bSderaadt.Ar dir1
146ae8d569bSderaadtto their state in
147ae8d569bSderaadt.Ar dir2 .
148c3cd0760Sderaadt.It Fl f
149f4ff8ff1SjmcIdentical output to that of the
150ae8d569bSderaadt.Fl e
151f4ff8ff1Sjmcflag, but in reverse order.
152f4ff8ff1SjmcIt cannot be digested by
153ae8d569bSderaadt.Xr ed 1 .
154c3cd0760Sderaadt.It Fl n
155f4ff8ff1SjmcProduces a script similar to that of
156ae8d569bSderaadt.Fl e ,
157ae8d569bSderaadtbut in the opposite order and with a count of changed lines on each
158f4ff8ff1Sjmcinsert or delete command.
159f4ff8ff1SjmcThis is the form used by
160ae8d569bSderaadt.Xr rcsdiff 1 .
161cab5d83cSmillert.It Fl q
162cab5d83cSmillertJust print a line when the files differ.
163cab5d83cSmillertDoes not output a list of changes.
164d4b26a09Sjmc.It Fl U Ar number
165d4b26a09SjmcLike
166d4b26a09Sjmc.Fl u
167d4b26a09Sjmcbut produces a diff with
168d4b26a09Sjmc.Ar number
169d4b26a09Sjmclines of context.
170522b32d6Smillert.It Fl u
171522b32d6SmillertProduces a
172522b32d6Smillert.Em unified
173522b32d6Smillertdiff with 3 lines of context.
174522b32d6SmillertA unified diff is similar to the context diff produced by the
175522b32d6Smillert.Fl c
176522b32d6Smillertoption.
177522b32d6SmillertHowever, unlike with
178522b32d6Smillert.Fl c ,
179522b32d6Smillertall lines to be changed (added and/or removed) are present in
180522b32d6Smillerta single section.
181c3cd0760Sderaadt.El
182ae8d569bSderaadt.Pp
183ae8d569bSderaadtComparison options:
184c3cd0760Sderaadt.Bl -tag -width Ds
1854ec4b3d5Smillert.It Fl a
1867ce2854cSschwarzeTreat all files as ASCII text.
187d594a036SjmcNormally
188d594a036Sjmc.Nm
189d594a036Sjmcwill simply print
190d594a036Sjmc.Dq Binary files ... differ
191d594a036Sjmcif files contain binary characters.
192d594a036SjmcUse of this option forces
193d594a036Sjmc.Nm
194d594a036Sjmcto produce a diff.
195c3cd0760Sderaadt.It Fl b
196f4ff8ff1SjmcCauses trailing blanks (spaces and tabs) to be ignored, and other
197ae8d569bSderaadtstrings of blanks to compare equal.
19861e76687Sjmc.It Fl d
19961e76687SjmcTry very hard to produce a diff as small as possible.
20061e76687SjmcThis may consume a lot of processing power and memory when processing
20161e76687Sjmclarge files with many changes.
202ccd55a2cSotto.It Fl I Ar pattern
203ccd55a2cSottoIgnores changes, insertions, and deletions whose lines match the
204ccd55a2cSottoextended regular expression
205ccd55a2cSotto.Ar pattern .
206ccd55a2cSottoMultiple
207ccd55a2cSotto.Fl I
208ccd55a2cSottopatterns may be specified.
209ccd55a2cSottoAll lines in the change must match some pattern for the change to be
210ccd55a2cSottoignored.
211ccd55a2cSottoSee
212ccd55a2cSotto.Xr re_format 7
213ccd55a2cSottofor more information on regular expression patterns.
2141f9aa9e0Smillert.It Fl i
2151f9aa9e0SmillertIgnores the case of letters.
2161f9aa9e0SmillertE.g.,
2171f9aa9e0Smillert.Dq A
2181f9aa9e0Smillertwill compare equal to
2191f9aa9e0Smillert.Dq a .
220d4b26a09Sjmc.It Fl L Ar label
221d4b26a09SjmcPrint
222d4b26a09Sjmc.Ar label
223d4b26a09Sjmcinstead of the first (and second, if this option is specified twice)
224d4b26a09Sjmcfile name and time in the context or unified diff header.
225871b994dSotto.It Fl p
226871b994dSottoWith unified and context diffs, show with each change
227871b994dSottothe first 40 characters of the last line before the context beginning
228871b994dSottowith a letter, an underscore or a dollar sign.
229871b994dSottoFor C source code following standard layout conventions, this will
230871b994dSottoshow the prototype of the function the change applies to.
231d4b26a09Sjmc.It Fl T
232d4b26a09SjmcPrint a tab rather than a space before the rest of the line for the
233d4b26a09Sjmcnormal, context or unified output formats.
234d4b26a09SjmcThis makes the alignment of tabs in the line consistent.
235c3cd0760Sderaadt.It Fl t
236f4ff8ff1SjmcWill expand tabs in output lines.
237f4ff8ff1SjmcNormal or
238ae8d569bSderaadt.Fl c
239ae8d569bSderaadtoutput adds character(s) to the front of each line which may screw up
240ae8d569bSderaadtthe indentation of the original source lines and make the output listing
241f4ff8ff1Sjmcdifficult to interpret.
242f4ff8ff1SjmcThis option will preserve the original source's indentation.
243c3cd0760Sderaadt.It Fl w
244f4ff8ff1SjmcIs similar to
245ae8d569bSderaadt.Fl b
246f4ff8ff1Sjmcbut causes whitespace (blanks and tabs) to be totally ignored.
247f4ff8ff1SjmcE.g.,
248f4ff8ff1Sjmc.Dq if (\ \&a == b \&)
249f4ff8ff1Sjmcwill compare equal to
250f4ff8ff1Sjmc.Dq if(a==b) .
251c3cd0760Sderaadt.El
252ae8d569bSderaadt.Pp
253ae8d569bSderaadtDirectory comparison options:
254c3cd0760Sderaadt.Bl -tag -width Ds
2554ec4b3d5Smillert.It Fl N
2564ec4b3d5SmillertIf a file is found in only one directory, act as if it was found in the
2574ec4b3d5Smillertother directory too but was of zero size.
258aeb82612Smillert.It Fl P
259aeb82612SmillertIf a file is found only in
260aeb82612Smillert.Ar dir2 ,
261aeb82612Smillertact as if it was found in
262aeb82612Smillert.Ar dir1
263aeb82612Smillerttoo but was of zero size.
264c3cd0760Sderaadt.It Fl r
265f4ff8ff1SjmcCauses application of
266f4ff8ff1Sjmc.Nm
267ae8d569bSderaadtrecursively to common subdirectories encountered.
268522b32d6Smillert.It Fl S Ar name
269f4ff8ff1SjmcRe-starts a directory
270f4ff8ff1Sjmc.Nm
271f4ff8ff1Sjmcin the middle, beginning with file
272ae8d569bSderaadt.Ar name .
273d4b26a09Sjmc.It Fl s
274d4b26a09SjmcCauses
275d4b26a09Sjmc.Nm
276d4b26a09Sjmcto report files which are the same, which are otherwise not mentioned.
2774ec4b3d5Smillert.It Fl X Ar file
2784ec4b3d5SmillertExclude files and subdirectories from comparison whose basenames match
2794ec4b3d5Smillertlines in
2804ec4b3d5Smillert.Ar file .
2814ec4b3d5SmillertMultiple
2824ec4b3d5Smillert.Fl X
2834ec4b3d5Smillertoptions may be specified.
2844ec4b3d5Smillert.It Fl x Ar pattern
2854ec4b3d5SmillertExclude files and subdirectories from comparison whose basenames match
2864ec4b3d5Smillert.Ar pattern .
287*394d9b5aSjmcPatterns are matched using shell-style globbing as described in
288*394d9b5aSjmc.Xr glob 7 .
2894ec4b3d5SmillertMultiple
2904ec4b3d5Smillert.Fl x
2914ec4b3d5Smillertoptions may be specified.
292c3cd0760Sderaadt.El
293ae8d569bSderaadt.Pp
294ae8d569bSderaadtIf both arguments are directories,
295f4ff8ff1Sjmc.Nm
296ae8d569bSderaadtsorts the contents of the directories by name, and then runs the
297ae8d569bSderaadtregular file
298f4ff8ff1Sjmc.Nm
299ae8d569bSderaadtalgorithm, producing a change list,
300ae8d569bSderaadton text files which are different.
301ae8d569bSderaadtBinary files which differ,
302ae8d569bSderaadtcommon subdirectories, and files which appear in only one directory
303ae8d569bSderaadtare described as such.
3045f4c3fa8SmillertIn directory mode only regular files and directories are compared.
3057ce2854cSschwarzeIf a non-regular file such as a device special file or FIFO
306ccd55a2cSottois encountered, a diagnostic message is printed.
307ae8d569bSderaadt.Pp
308ae8d569bSderaadtIf only one of
309ae8d569bSderaadt.Ar file1
310ae8d569bSderaadtand
311ae8d569bSderaadt.Ar file2
312ae8d569bSderaadtis a directory,
313f4ff8ff1Sjmc.Nm
314ae8d569bSderaadtis applied to the non-directory file and the file contained in
315ae8d569bSderaadtthe directory file with a filename that is the same as the
316ae8d569bSderaadtlast component of the non-directory file.
317ae8d569bSderaadt.Pp
318c3cd0760SderaadtIf either
319ae8d569bSderaadt.Ar file1
320ae8d569bSderaadtor
321ae8d569bSderaadt.Ar file2
322ae8d569bSderaadtis
323310ed8f1Sjmc.Sq - ,
324ae8d569bSderaadtthe standard input is
325ae8d569bSderaadtused in its place.
326ae8d569bSderaadt.Ss Output Style
327ae8d569bSderaadtThe default (without
328ae8d569bSderaadt.Fl e ,
329ae8d569bSderaadt.Fl c ,
330ae8d569bSderaadtor
331ae8d569bSderaadt.Fl n
332ae8d569bSderaadt.\" -C
333ae8d569bSderaadtoptions)
334ae8d569bSderaadtoutput contains lines of these forms, where
335ae8d569bSderaadt.Va XX , YY , ZZ , QQ
336ae8d569bSderaadtare line numbers respective of file order.
337ae8d569bSderaadt.Pp
338c3cd0760Sderaadt.Bl -tag -width "XX,YYcZZ,QQ" -compact
339c3cd0760Sderaadt.It Li XX Ns Ic a Ns Li YY
340ae8d569bSderaadtAt (the end of) line
341ae8d569bSderaadt.Va XX
342ae8d569bSderaadtof
343ae8d569bSderaadt.Ar file1 ,
344ae8d569bSderaadtappend the contents
345ae8d569bSderaadtof line
346ae8d569bSderaadt.Va YY
347ae8d569bSderaadtof
348ae8d569bSderaadt.Ar file2
349ae8d569bSderaadtto make them equal.
350c3cd0760Sderaadt.It Li XX Ns Ic a Ns Li YY,ZZ
351ae8d569bSderaadtSame as above, but append the range of lines,
352ae8d569bSderaadt.Va YY
353ae8d569bSderaadtthrough
354ae8d569bSderaadt.Va ZZ
355ae8d569bSderaadtof
356ae8d569bSderaadt.Ar file2
357ae8d569bSderaadtto line
358ae8d569bSderaadt.Va XX
359ae8d569bSderaadtof file1.
360c3cd0760Sderaadt.It Li XX Ns Ic d Ns Li YY
361ae8d569bSderaadtAt line
362ae8d569bSderaadt.Va XX
363ae8d569bSderaadtdelete
364f4ff8ff1Sjmcthe line.
365f4ff8ff1SjmcThe value
366ae8d569bSderaadt.Va YY
367f4ff8ff1Sjmctells to which line the change would bring
368ae8d569bSderaadt.Ar file1
369ae8d569bSderaadtin line with
370ae764264Sjmc.Ar file2 .
371c3cd0760Sderaadt.It Li XX,YY Ns Ic d Ns Li ZZ
372ae8d569bSderaadtDelete the range of lines
373ae8d569bSderaadt.Va XX
374ae8d569bSderaadtthrough
375ae8d569bSderaadt.Va YY
376ae8d569bSderaadtin
377ae8d569bSderaadt.Ar file1 .
378c3cd0760Sderaadt.It Li XX Ns Ic c Ns Li YY
379ae8d569bSderaadtChange the line
380ae8d569bSderaadt.Va XX
381ae8d569bSderaadtin
382ae8d569bSderaadt.Ar file1
383ae8d569bSderaadtto the line
384ae8d569bSderaadt.Va YY
385ae8d569bSderaadtin
386ae8d569bSderaadt.Ar file2 .
387c3cd0760Sderaadt.It Li XX,YY Ns Ic c Ns Li ZZ
388ae8d569bSderaadtReplace the range of specified lines with the line
389ae8d569bSderaadt.Va ZZ .
390c3cd0760Sderaadt.It Li XX,YY Ns Ic c Ns Li ZZ,QQ
391ae8d569bSderaadtReplace the range
392ccd55a2cSotto.Va XX , Ns Va YY
393ae8d569bSderaadtfrom
394ae8d569bSderaadt.Ar file1
395ae8d569bSderaadtwith the range
396ccd55a2cSotto.Va ZZ , Ns Va QQ
397ae8d569bSderaadtfrom
398ae8d569bSderaadt.Ar file2 .
399c3cd0760Sderaadt.El
400ae8d569bSderaadt.Pp
401ae8d569bSderaadtThese lines resemble
402ae8d569bSderaadt.Xr ed 1
403ae8d569bSderaadtsubcommands to convert
404ae8d569bSderaadt.Ar file1
405ae8d569bSderaadtinto
406ae8d569bSderaadt.Ar file2 .
407ae8d569bSderaadtThe line numbers before the action letters pertain to
408ae8d569bSderaadt.Ar file1 ;
409ae8d569bSderaadtthose after pertain to
410ae8d569bSderaadt.Ar file2 .
411ae8d569bSderaadtThus, by exchanging
412ae8d569bSderaadt.Ic a
413ae8d569bSderaadtfor
414ae8d569bSderaadt.Ic d
415ae8d569bSderaadtand reading the line in reverse order, one can also
416ae8d569bSderaadtdetermine how to convert
417ae8d569bSderaadt.Ar file2
418ae8d569bSderaadtinto
419ae8d569bSderaadt.Ar file1 .
420ae8d569bSderaadtAs in
421ae8d569bSderaadt.Xr ed 1 ,
422ae8d569bSderaadtidentical
423ae8d569bSderaadtpairs (where num1 = num2) are abbreviated as a single
424ae8d569bSderaadtnumber.
425ae8d569bSderaadt.Sh FILES
426dffd348cSmillert.Bl -tag -width /tmp/diff.XXXXXXXX -compact
427ccd55a2cSotto.It Pa /tmp/diff. Ns Ar XXXXXXXX
428dffd348cSmillertTemporary file used when comparing a device or the standard input.
429dffd348cSmillertNote that the temporary file is unlinked as soon as it is created
430dffd348cSmillertso it will not show up in a directory listing.
431c3cd0760Sderaadt.El
432f1c64ac4Sjmc.Sh EXIT STATUS
433ae8d569bSderaadtThe
434f4ff8ff1Sjmc.Nm
435ae8d569bSderaadtutility exits with one of the following values:
436c3cd0760Sderaadt.Pp
437f1c64ac4Sjmc.Bl -tag -width Ds -offset indent -compact
4389a981e8cSjmc.It 0
439ae8d569bSderaadtNo differences were found.
4409a981e8cSjmc.It 1
441ae8d569bSderaadtDifferences were found.
4420aece4daSjmc.It >1
443ae8d569bSderaadtAn error occurred.
444c3cd0760Sderaadt.El
445f4ff8ff1Sjmc.Sh SEE ALSO
446f4ff8ff1Sjmc.Xr cmp 1 ,
447f4ff8ff1Sjmc.Xr comm 1 ,
448f4ff8ff1Sjmc.Xr diff3 1 ,
4494ec4b3d5Smillert.Xr ed 1 ,
4503b4c17c4Sschwarze.Xr patch 1 ,
4513b4c17c4Sschwarze.Xr sdiff 1
452e456b1acSjmc.Rs
453e456b1acSjmc.%A James W. Hunt
454e456b1acSjmc.%A M. Douglas McIlroy
455e456b1acSjmc.%T "An Algorithm for Differential File Comparison"
456093fc5b9Sjsg.%I AT&T Bell Laboratories
457e456b1acSjmc.%J Computing Science Technical Report
458093fc5b9Sjsg.%N 41
459e456b1acSjmc.%D June 1976
460e456b1acSjmc.Re
4615c8583b8Smillert.Sh STANDARDS
4625c8583b8SmillertThe
4635c8583b8Smillert.Nm
4647c5a075bSjmcutility is compliant with the
46599332e38Sjmc.St -p1003.1-2008
4665c8583b8Smillertspecification.
4677c5a075bSjmc.Pp
4687c5a075bSjmcThe flags
469998894f5Smillert.Op Fl aDdIiLNnPpqSsTtwXx
4707c5a075bSjmcare extensions to that specification.
471f4ff8ff1Sjmc.Sh HISTORY
472f4ff8ff1SjmcA
473f4ff8ff1Sjmc.Nm
474f4ff8ff1Sjmccommand appeared in
47501c04610Sjsg.At v5 .
476