]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/diff/diff.1
zfs: merge openzfs/zfs@a9d6b0690
[FreeBSD/FreeBSD.git] / usr.bin / diff / diff.1
1 .\" $OpenBSD: diff.1,v 1.47 2015/11/24 19:35:41 jmc Exp $
2 .\"
3 .\" Copyright (c) 1980, 1990, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)diff.1      8.1 (Berkeley) 6/30/93
31 .\" $FreeBSD$
32 .\"
33 .Dd March 10, 2022
34 .Dt DIFF 1
35 .Os
36 .Sh NAME
37 .Nm diff
38 .Nd differential file and directory comparator
39 .Sh SYNOPSIS
40 .Nm diff
41 .Op Fl aBbdipTtw
42 .Oo
43 .Fl c | e | f |
44 .Fl n | q | u | y
45 .Oc
46 .Op Fl -brief
47 .Op Fl -color Ns = Ns Ar when
48 .Op Fl -changed-group-format Ar GFMT
49 .Op Fl -ed
50 .Op Fl -expand-tabs
51 .Op Fl -forward-ed
52 .Op Fl -ignore-all-space
53 .Op Fl -ignore-case
54 .Op Fl -ignore-space-change
55 .Op Fl -initial-tab
56 .Op Fl -minimal
57 .Op Fl -no-ignore-file-name-case
58 .Op Fl -normal
59 .Op Fl -rcs
60 .Op Fl -show-c-function
61 .Op Fl -starting-file
62 .Op Fl -speed-large-files
63 .Op Fl -strip-trailing-cr
64 .Op Fl -tabsize Ar number
65 .Op Fl -text
66 .Op Fl -unified
67 .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
68 .Op Fl F Ar pattern | Fl -show-function-line Ar pattern
69 .Op Fl L Ar label | Fl -label Ar label
70 .Ar file1 file2
71 .Nm diff
72 .Op Fl aBbdilpTtw
73 .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
74 .Op Fl F Ar pattern | Fl -show-function-line Ar pattern
75 .Op Fl L Ar label | Fl -label Ar label
76 .Op Fl -brief
77 .Op Fl -color Ns = Ns Ar when
78 .Op Fl -changed-group-format Ar GFMT
79 .Op Fl -ed
80 .Op Fl -expand-tabs
81 .Op Fl -forward-ed
82 .Op Fl -ignore-all-space
83 .Op Fl -ignore-case
84 .Op Fl -ignore-space-change
85 .Op Fl -initial-tab
86 .Op Fl -minimal
87 .Op Fl -no-ignore-file-name-case
88 .Op Fl -normal
89 .Op Fl -paginate
90 .Op Fl -rcs
91 .Op Fl -show-c-function
92 .Op Fl -speed-large-files
93 .Op Fl -starting-file
94 .Op Fl -strip-trailing-cr
95 .Op Fl -tabsize Ar number
96 .Op Fl -text
97 .Fl C Ar number | -context Ar number
98 .Ar file1 file2
99 .Nm diff
100 .Op Fl aBbdiltw
101 .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
102 .Op Fl -brief
103 .Op Fl -color Ns = Ns Ar when
104 .Op Fl -changed-group-format Ar GFMT
105 .Op Fl -ed
106 .Op Fl -expand-tabs
107 .Op Fl -forward-ed
108 .Op Fl -ignore-all-space
109 .Op Fl -ignore-case
110 .Op Fl -ignore-space-change
111 .Op Fl -initial-tab
112 .Op Fl -minimal
113 .Op Fl -no-ignore-file-name-case
114 .Op Fl -normal
115 .Op Fl -paginate
116 .Op Fl -rcs
117 .Op Fl -show-c-function
118 .Op Fl -speed-large-files
119 .Op Fl -starting-file
120 .Op Fl -strip-trailing-cr
121 .Op Fl -tabsize Ar number
122 .Op Fl -text
123 .Fl D Ar string | Fl -ifdef Ar string
124 .Ar file1 file2
125 .Nm diff
126 .Op Fl aBbdilpTtw
127 .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
128 .Op Fl F Ar pattern | Fl -show-function-line Ar pattern
129 .Op Fl L Ar label | Fl -label Ar label
130 .Op Fl -brief
131 .Op Fl -color Ns = Ns Ar when
132 .Op Fl -changed-group-format Ar GFMT
133 .Op Fl -ed
134 .Op Fl -expand-tabs
135 .Op Fl -forward-ed
136 .Op Fl -ignore-all-space
137 .Op Fl -ignore-case
138 .Op Fl -ignore-space-change
139 .Op Fl -initial-tab
140 .Op Fl -minimal
141 .Op Fl -no-ignore-file-name-case
142 .Op Fl -normal
143 .Op Fl -paginate
144 .Op Fl -rcs
145 .Op Fl -show-c-function
146 .Op Fl -speed-large-files
147 .Op Fl -starting-file
148 .Op Fl -strip-trailing-cr
149 .Op Fl -tabsize Ar number
150 .Op Fl -text
151 .Fl U Ar number | Fl -unified Ar number
152 .Ar file1 file2
153 .Nm diff
154 .Op Fl aBbdilNPprsTtw
155 .Oo
156 .Fl c | e | f |
157 .Fl n | q | u
158 .Oc
159 .Op Fl -brief
160 .Op Fl -color Ns = Ns Ar when
161 .Op Fl -changed-group-format Ar GFMT
162 .Op Fl -context
163 .Op Fl -ed
164 .Op Fl -expand-tabs
165 .Op Fl -forward-ed
166 .Op Fl -ignore-all-space
167 .Op Fl -ignore-case
168 .Op Fl -ignore-space-change
169 .Op Fl -initial-tab
170 .Op Fl -minimal
171 .Op Fl -new-file
172 .Op Fl -no-ignore-file-name-case
173 .Op Fl -normal
174 .Op Fl -paginate
175 .Op Fl -rcs
176 .Op Fl -recursive
177 .Op Fl -report-identical-files
178 .Op Fl -show-c-function
179 .Op Fl -speed-large-files
180 .Op Fl -strip-trailing-cr
181 .Op Fl -tabsize Ar number
182 .Op Fl -text
183 .Op Fl -unidirectional-new-file
184 .Op Fl -unified
185 .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
186 .Op Fl F Ar pattern | Fl -show-function-line Ar pattern
187 .Bk -words
188 .Op Fl L Ar label | Fl -label Ar label
189 .Op Fl S Ar name | Fl -starting-file Ar name
190 .Op Fl X Ar file | Fl -exclude-from Ar file
191 .Op Fl x Ar pattern | Fl -exclude Ar pattern
192 .Ek
193 .Ar dir1 dir2
194 .Nm diff
195 .Op Fl aBbditwW
196 .Op Fl -color Ns = Ns Ar when
197 .Op Fl -expand-tabs
198 .Op Fl -ignore-all-blanks
199 .Op Fl -ignore-blank-lines
200 .Op Fl -ignore-case
201 .Op Fl -minimal
202 .Op Fl -no-ignore-file-name-case
203 .Op Fl -strip-trailing-cr
204 .Op Fl -suppress-common-lines
205 .Op Fl -tabsize Ar number
206 .Op Fl -text
207 .Op Fl -width
208 .Fl y | Fl -side-by-side
209 .Ar file1 file2
210 .Nm diff
211 .Op Fl -help
212 .Op Fl -version
213 .Sh DESCRIPTION
214 The
215 .Nm
216 utility compares the contents of
217 .Ar file1
218 and
219 .Ar file2
220 and writes to the standard output the list of changes necessary to
221 convert one file into the other.
222 No output is produced if the files are identical.
223 .Pp
224 Output options (mutually exclusive):
225 .Bl -tag -width Ds
226 .It Fl C Ar number Fl -context Ar number
227 Like
228 .Fl c
229 but produces a diff with
230 .Ar number
231 lines of context.
232 .It Fl c
233 Produces a diff with 3 lines of context.
234 With
235 .Fl c
236 the output format is modified slightly:
237 the output begins with identification of the files involved and
238 their creation dates and then each change is separated
239 by a line with fifteen
240 .Li * Ns 's .
241 The lines removed from
242 .Ar file1
243 are marked with
244 .Sq \&-\ \& ;
245 those added to
246 .Ar file2
247 are marked
248 .Sq +\ \& .
249 Lines which are changed from one file to the other are marked in
250 both files with
251 .Sq !\ \& .
252 Changes which lie within 3 lines of each other are grouped together on
253 output.
254 .It Fl D Ar string Fl -ifdef Ar string
255 Creates a merged version of
256 .Ar file1
257 and
258 .Ar file2
259 on the standard output, with C preprocessor controls included so that
260 a compilation of the result without defining
261 .Ar string
262 is equivalent to compiling
263 .Ar file1 ,
264 while defining
265 .Ar string
266 will yield
267 .Ar file2 .
268 .It Fl e -ed
269 Produces output in a form suitable as input for the editor utility,
270 .Xr ed 1 ,
271 which can then be used to convert file1 into file2.
272 .Pp
273 Extra commands are added to the output when comparing directories with
274 .Fl e ,
275 so that the result is a
276 .Xr sh 1
277 script for converting text files which are common to the two directories
278 from their state in
279 .Ar dir1
280 to their state in
281 .Ar dir2 .
282 .It Fl f -forward-ed
283 Identical output to that of the
284 .Fl e
285 flag, but in reverse order.
286 It cannot be digested by
287 .Xr ed 1 .
288 .It Fl -help
289 This option prints a summary to stdout and exits with status 0.
290 .It Fl n
291 Produces a script similar to that of
292 .Fl e ,
293 but in the opposite order and with a count of changed lines on each
294 insert or delete command.
295 This is the form used by rcsdiff.
296 .It Fl q -brief
297 Just print a line when the files differ.
298 Does not output a list of changes.
299 .It Fl U Ar number Fl -unified Ar number
300 Like
301 .Fl u
302 but produces a diff with
303 .Ar number
304 lines of context.
305 .It Fl u
306 Produces a
307 .Em unified
308 diff with 3 lines of context.
309 A unified diff is similar to the context diff produced by the
310 .Fl c
311 option.
312 However, unlike with
313 .Fl c ,
314 all lines to be changed (added and/or removed) are present in
315 a single section.
316 .It Fl -version
317 This option prints a version string to stdout and exits with status 0.
318 .It Fl y Fl -side-by-side
319 Output in two columns with a marker between them.
320 The marker can be one
321 of the following:
322 .Pp
323 .Bl -tag -width Ds -offset indent -compact
324 .It space
325 Corresponding lines are identical.
326 .It '|'
327 Corresponding lines are different.
328 .It '<'
329 Files differ and only the first file contains the line.
330 .It '>'
331 Files differ and only the second file contains the line.
332 .El
333 .El
334 .Pp
335 Comparison options:
336 .Bl -tag -width Ds
337 .It Fl a -text
338 Treat all files as ASCII text.
339 Normally
340 .Nm
341 will simply print
342 .Dq Binary files ... differ
343 if files contain binary characters.
344 Use of this option forces
345 .Nm
346 to produce a diff.
347 .It Fl B Fl -ignore-blank-lines
348 Causes chunks that include only blank lines to be ignored.
349 .It Fl b -ignore-space-change
350 Causes trailing blanks (spaces and tabs) to be ignored, and other
351 strings of blanks to compare equal.
352 .It Fl -color= Ns Oo Ar when Oc
353 Color the additions green, and removals red, or the value in the
354 .Ev DIFFCOLORS
355 environment variable.
356 The possible values of
357 .Ar when
358 are
359 .Dq Cm never ,
360 .Dq Cm always
361 and
362 .Dq Cm auto .
363 .Cm auto
364 will use color if the output is a tty and the
365 .Ev COLORTERM
366 environment variable is set to a non-empty string.
367 .It Fl d -minimal
368 Try very hard to produce a diff as small as possible.
369 This may consume a lot of processing power and memory when processing
370 large files with many changes.
371 .It Fl F Ar pattern, Fl -show-function-line Ar pattern
372 Like
373 .Fl p,
374 but display the last line that matches provided pattern.
375 .It Fl I Ar pattern Fl -ignore-matching-lines Ar pattern
376 Ignores changes, insertions, and deletions whose lines match the
377 extended regular expression
378 .Ar pattern .
379 Multiple
380 .Fl I
381 patterns may be specified.
382 All lines in the change must match some pattern for the change to be
383 ignored.
384 See
385 .Xr re_format 7
386 for more information on regular expression patterns.
387 .It Fl i -ignore-case
388 Ignores the case of letters.
389 E.g.,
390 .Dq A
391 will compare equal to
392 .Dq a .
393 .It Fl l -paginate
394 Pass the output through
395 .Xr pr 1
396 to paginate it.
397 .It Fl L Ar label Fl -label Ar label
398 Print
399 .Ar label
400 instead of the first (and second, if this option is specified twice)
401 file name and time in the context or unified diff header.
402 .It Fl p -show-c-function
403 With unified and context diffs, show with each change
404 the first 40 characters of the last line before the context beginning
405 with a letter, an underscore or a dollar sign.
406 For C and Objective-C source code following standard layout conventions, this
407 will show the prototype of the function the change applies to.
408 .It Fl T -initial-tab
409 Print a tab rather than a space before the rest of the line for the
410 normal, context or unified output formats.
411 This makes the alignment of tabs in the line consistent.
412 .It Fl t -expand-tabs
413 Will expand tabs in output lines.
414 Normal or
415 .Fl c
416 output adds character(s) to the front of each line which may screw up
417 the indentation of the original source lines and make the output listing
418 difficult to interpret.
419 This option will preserve the original source's indentation.
420 .It Fl w -ignore-all-blanks
421 Is similar to
422 .Fl b -ignore-space-change
423 but causes whitespace (blanks and tabs) to be totally ignored.
424 E.g.,
425 .Dq if (\ \&a == b \&)
426 will compare equal to
427 .Dq if(a==b) .
428 .It Fl W Ar number Fl -width Ar number
429 Output at most
430 .Ar number
431 columns when using side by side format.
432 The default value is 130.
433 .It Fl -changed-group-format Ar GFMT
434 Format input groups in the provided
435 .Pp
436 the format is a string with special keywords:
437 .Bl -tag -width %<
438 .It %<
439 lines from FILE1
440 .It %<
441 lines from FILE2
442 .El
443 .It Fl -ignore-file-name-case
444 ignore case when comparing file names
445 .It Fl -no-ignore-file-name-case
446 do not ignore case wen comparing file names (default)
447 .It Fl -normal
448 default diff output
449 .It Fl -speed-large-files
450 stub option for compatibility with GNU diff
451 .It Fl -strip-trailing-cr
452 strip carriage return on input files
453 .It Fl -suppress-common-lines
454 Do not output common lines when using the side by side format
455 .It Fl -tabsize Ar number
456 Number of spaces representing a tab (default 8)
457 .El
458 .Pp
459 Directory comparison options:
460 .Bl -tag -width Ds
461 .It Fl N -new-file
462 If a file is found in only one directory, act as if it was found in the
463 other directory too but was of zero size.
464 .It Fl P -unidirectional-new-file
465 If a file is found only in
466 .Ar dir2 ,
467 act as if it was found in
468 .Ar dir1
469 too but was of zero size.
470 .It Fl r -recursive
471 Causes application of
472 .Nm
473 recursively to common subdirectories encountered.
474 .It Fl S Ar name Fl -starting-file Ar name
475 Re-starts a directory
476 .Nm
477 in the middle, beginning with file
478 .Ar name .
479 .It Fl s -report-identical-files
480 Causes
481 .Nm
482 to report files which are the same, which are otherwise not mentioned.
483 .It Fl X Ar file Fl -exclude-from Ar file
484 Exclude files and subdirectories from comparison whose basenames match
485 lines in
486 .Ar file .
487 Multiple
488 .Fl X
489 options may be specified.
490 .It Fl x Ar pattern Fl -exclude Ar pattern
491 Exclude files and subdirectories from comparison whose basenames match
492 .Ar pattern .
493 Patterns are matched using shell-style globbing via
494 .Xr fnmatch 3 .
495 Multiple
496 .Fl x
497 options may be specified.
498 .El
499 .Pp
500 If both arguments are directories,
501 .Nm
502 sorts the contents of the directories by name, and then runs the
503 regular file
504 .Nm
505 algorithm, producing a change list,
506 on text files which are different.
507 Binary files which differ,
508 common subdirectories, and files which appear in only one directory
509 are described as such.
510 In directory mode only regular files and directories are compared.
511 If a non-regular file such as a device special file or FIFO is encountered,
512 a diagnostic message is printed.
513 .Pp
514 If only one of
515 .Ar file1
516 and
517 .Ar file2
518 is a directory,
519 .Nm
520 is applied to the non-directory file and the file contained in
521 the directory file with a filename that is the same as the
522 last component of the non-directory file.
523 .Pp
524 If either
525 .Ar file1
526 or
527 .Ar file2
528 is
529 .Sq - ,
530 the standard input is
531 used in its place.
532 .Ss Output Style
533 The default (without
534 .Fl e ,
535 .Fl c ,
536 or
537 .Fl n -rcs
538 .\" -C
539 options)
540 output contains lines of these forms, where
541 .Va XX , YY , ZZ , QQ
542 are line numbers respective of file order.
543 .Pp
544 .Bl -tag -width "XX,YYcZZ,QQ" -compact
545 .It Li XX Ns Ic a Ns Li YY
546 At (the end of) line
547 .Va XX
548 of
549 .Ar file1 ,
550 append the contents
551 of line
552 .Va YY
553 of
554 .Ar file2
555 to make them equal.
556 .It Li XX Ns Ic a Ns Li YY,ZZ
557 Same as above, but append the range of lines,
558 .Va YY
559 through
560 .Va ZZ
561 of
562 .Ar file2
563 to line
564 .Va XX
565 of file1.
566 .It Li XX Ns Ic d Ns Li YY
567 At line
568 .Va XX
569 delete
570 the line.
571 The value
572 .Va YY
573 tells to which line the change would bring
574 .Ar file1
575 in line with
576 .Ar file2 .
577 .It Li XX,YY Ns Ic d Ns Li ZZ
578 Delete the range of lines
579 .Va XX
580 through
581 .Va YY
582 in
583 .Ar file1 .
584 .It Li XX Ns Ic c Ns Li YY
585 Change the line
586 .Va XX
587 in
588 .Ar file1
589 to the line
590 .Va YY
591 in
592 .Ar file2 .
593 .It Li XX,YY Ns Ic c Ns Li ZZ
594 Replace the range of specified lines with the line
595 .Va ZZ .
596 .It Li XX,YY Ns Ic c Ns Li ZZ,QQ
597 Replace the range
598 .Va XX , Ns Va YY
599 from
600 .Ar file1
601 with the range
602 .Va ZZ , Ns Va QQ
603 from
604 .Ar file2 .
605 .El
606 .Pp
607 These lines resemble
608 .Xr ed 1
609 subcommands to convert
610 .Ar file1
611 into
612 .Ar file2 .
613 The line numbers before the action letters pertain to
614 .Ar file1 ;
615 those after pertain to
616 .Ar file2 .
617 Thus, by exchanging
618 .Ic a
619 for
620 .Ic d
621 and reading the line in reverse order, one can also
622 determine how to convert
623 .Ar file2
624 into
625 .Ar file1 .
626 As in
627 .Xr ed 1 ,
628 identical
629 pairs (where num1 = num2) are abbreviated as a single
630 number.
631 .Sh ENVIRONMENT
632 .Bl -tag -width DIFFCOLORS
633 .It Ev DIFFCOLORS
634 The value of this variable is the form
635 .Ar add Ns : Ns Ar rm ,
636 where
637 .Ar add
638 is the ASCII escape sequence for additions and
639 .Ar rm
640 is the ASCII escape sequence for deletions.
641 If this is unset,
642 .Nm
643 uses green for additions and red for removals.
644 .El
645 .Sh FILES
646 .Bl -tag -width /tmp/diff.XXXXXXXX -compact
647 .It Pa /tmp/diff.XXXXXXXX
648 Temporary file used when comparing a device or the standard input.
649 Note that the temporary file is unlinked as soon as it is created
650 so it will not show up in a directory listing.
651 .El
652 .Sh EXIT STATUS
653 The
654 .Nm
655 utility exits with one of the following values:
656 .Pp
657 .Bl -tag -width Ds -offset indent -compact
658 .It 0
659 No differences were found.
660 .It 1
661 Differences were found.
662 .It >1
663 An error occurred.
664 .El
665 .Pp
666 The
667 .Fl -help
668 and
669 .Fl -version
670 options exit with a status of 0.
671 .Sh EXAMPLES
672 Compare
673 .Pa old_dir
674 and
675 .Pa new_dir
676 recursively generating an unified diff and treating files found only in one
677 of those directories as new files:
678 .Bd -literal -offset indent
679 $ diff -ruN /path/to/old_dir /path/to/new_dir
680 .Ed
681 .Pp
682 Same as above but excluding files matching the expressions
683 .Dq *.h
684 and
685 .Dq *.c :
686 .Bd -literal -offset indent
687 $ diff -ruN -x '*.h' -x '*.c' /path/to/old_dir /path/to/new_dir
688 .Ed
689 .Pp
690 Show a single line indicating if the files differ:
691 .Bd -literal -offset indent
692 $ diff -q /boot/loader.conf /boot/defaults/loader.conf
693 Files /boot/loader.conf and /boot/defaults/loader.conf differ
694 .Ed
695 .Pp
696 Assuming a file named
697 .Pa example.txt
698 with the following contents:
699 .Bd -literal -offset indent
700 FreeBSD is an operating system
701 Linux is a kernel
702 OpenBSD is an operating system
703 .Ed
704 .Pp
705 Compare stdin with
706 .Pa example.txt
707 excluding from the comparison those lines containing either
708 .Qq Linux
709 or
710 .Qq Open :
711 .Bd -literal -offset indent
712 $ echo "FreeBSD is an operating system" | diff -q -I 'Linux|Open' example.txt -
713 .Ed
714 .Sh SEE ALSO
715 .Xr cmp 1 ,
716 .Xr comm 1 ,
717 .Xr diff3 1 ,
718 .Xr ed 1 ,
719 .Xr patch 1 ,
720 .Xr pr 1 ,
721 .Xr sdiff 1
722 .Rs
723 .%A James W. Hunt
724 .%A M. Douglas McIlroy
725 .%T "An Algorithm for Differential File Comparison"
726 .%J Computing Science Technical Report
727 .%Q Bell Laboratories 41
728 .%D June 1976
729 .Re
730 .Sh STANDARDS
731 The
732 .Nm
733 utility is compliant with the
734 .St -p1003.1-2008
735 specification.
736 .Pp
737 The flags
738 .Op Fl aDdIiLlNnPpqSsTtwXxy
739 are extensions to that specification.
740 .Sh HISTORY
741 A
742 .Nm
743 command appeared in
744 .At v6 .