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