Upgrade dialog(1). 1/2
[dragonfly.git] / usr.sbin / mtree / mtree.8
1 .\"     $NetBSD: mtree.8,v 1.72 2017/02/22 14:15:15 abhinav Exp $
2 .\"
3 .\" Copyright (c) 1989, 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 .\" Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
31 .\" All rights reserved.
32 .\"
33 .\" This code is derived from software contributed to The NetBSD Foundation
34 .\" by Luke Mewburn of Wasabi Systems.
35 .\"
36 .\" Redistribution and use in source and binary forms, with or without
37 .\" modification, are permitted provided that the following conditions
38 .\" are met:
39 .\" 1. Redistributions of source code must retain the above copyright
40 .\"    notice, this list of conditions and the following disclaimer.
41 .\" 2. Redistributions in binary form must reproduce the above copyright
42 .\"    notice, this list of conditions and the following disclaimer in the
43 .\"    documentation and/or other materials provided with the distribution.
44 .\"
45 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
46 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
47 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
48 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
49 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
50 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
51 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
52 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
53 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
55 .\" POSSIBILITY OF SUCH DAMAGE.
56 .\"
57 .\"     @(#)mtree.8     8.2 (Berkeley) 12/11/93
58 .\"
59 .Dd February 15, 2020
60 .Dt MTREE 8
61 .Os
62 .Sh NAME
63 .Nm mtree
64 .Nd map a directory hierarchy
65 .Sh SYNOPSIS
66 .Nm
67 .Op Fl bCcDdejLlMnPqrStUuWx
68 .Op Fl i | Fl m
69 .Op Fl E Ar tags
70 .Op Fl F Ar flavor
71 .Op Fl f Ar spec
72 .Op Fl I Ar tags
73 .Op Fl K Ar keywords
74 .Op Fl k Ar keywords
75 .Op Fl N Ar dbdir
76 .Op Fl O Ar onlyfile
77 .Op Fl p Ar path
78 .Op Fl R Ar keywords
79 .Op Fl s Ar seed
80 .Op Fl X Ar exclude-file
81 .Sh DESCRIPTION
82 The
83 .Nm
84 utility compares a file hierarchy against a specification,
85 creates a specification for a file hierarchy, or modifies
86 a specification.
87 .Pp
88 The default action, if not overridden by command line options,
89 is to compare the file hierarchy rooted in the current directory
90 against a specification read from the standard input.
91 Messages are written to the standard output for any files whose
92 characteristics do not match the specification, or which are
93 missing from either the file hierarchy or the specification.
94 .Pp
95 The options are as follows:
96 .Bl -tag -width Xxxexcludexfilexx
97 .It Fl b
98 Suppress blank lines before entering and after exiting directories.
99 .It Fl C
100 Convert a specification into
101 a format that's easier to parse with various tools.
102 The input specification is read from standard input or
103 from the file given by
104 .Fl f Ar spec .
105 In the output, each file or directory is represented using a single line
106 (which might be very long).
107 The full path name
108 (beginning with
109 .Dq \&./ )
110 is always printed as the first field;
111 .Fl K ,
112 .Fl k ,
113 and
114 .Fl R
115 can be used to control which other keywords are printed;
116 .Fl E
117 and
118 .Fl I
119 can be used to control which files are printed;
120 and the
121 .Fl S
122 option can be used to sort the output.
123 .It Fl c
124 Print a specification for the file hierarchy originating at
125 the current working directory (or the directory provided by
126 .Fl p Ar path )
127 to the standard output.
128 The output is in a style using relative path names.
129 .It Fl D
130 As per
131 .Fl C ,
132 except that the path name is always printed as the last field instead of
133 the first.
134 .It Fl d
135 Ignore everything except directory type files.
136 .It Fl E Ar tags
137 Add the comma separated tags to the
138 .Dq exclusion
139 list.
140 Non-directories with tags which are in the exclusion list are not printed with
141 .Fl C
142 and
143 .Fl D .
144 .It Fl e
145 Don't complain about files that are in the file hierarchy, but not in the
146 specification.
147 .It Fl F Ar flavor
148 Set the compatibility flavor of the
149 .Nm
150 utility.
151 The
152 .Ar flavor
153 can be one of
154 .Sy mtree ,
155 .Sy freebsd9 ,
156 or
157 .Sy netbsd6 .
158 The default is
159 .Sy mtree .
160 The
161 .Sy freebsd9
162 and
163 .Sy netbsd6
164 flavors attempt to preserve output compatibility and command line option
165 backward compatibility with
166 .Fx 9.0
167 and
168 .Nx 6.0
169 respectively.
170 .It Fl f Ar spec
171 Read the specification from
172 .Ar file ,
173 instead of from the standard input.
174 .Pp
175 If this option is specified twice, the two specifications are compared
176 to each other rather than to the file hierarchy.
177 The specifications will be sorted like output generated using
178 .Fl c .
179 The output format in this case is somewhat reminiscent of
180 .Xr comm 1 ,
181 having "in first spec only", "in second spec only", and "different"
182 columns, prefixed by zero, one and two TAB characters respectively.
183 Each entry in the "different" column occupies two lines, one from each
184 specification.
185 .It Fl I Ar tags
186 Add the comma separated tags to the
187 .Dq inclusion
188 list.
189 Non-directories with tags which are in the inclusion list are printed with
190 .Fl C
191 and
192 .Fl D .
193 If no inclusion list is provided, the default is to display all files.
194 .It Fl i
195 If specified, set the schg and/or sappnd flags.
196 .It Fl j
197 Indent the output 4 spaces each time a directory level is descended when
198 creating a specification with the
199 .Fl c
200 option.
201 This does not affect either the /set statements or the comment before each
202 directory.
203 It does however affect the comment before the close of each directory.
204 This is the equivalent of the
205 .Fl i
206 option in the
207 .Fx
208 version of
209 .Nm .
210 .It Fl K Ar keywords
211 Add the specified (whitespace or comma separated) keywords to the current
212 set of keywords.
213 If
214 .Ql all
215 is specified, add all of the other keywords.
216 .It Fl k Ar keywords
217 Use the
218 .Sy type
219 keyword plus the specified (whitespace or comma separated)
220 keywords instead of the current set of keywords.
221 If
222 .Ql all
223 is specified, use all of the other keywords.
224 If the
225 .Sy type
226 keyword is not desired, suppress it with
227 .Fl R Ar type .
228 .It Fl L
229 Follow all symbolic links in the file hierarchy.
230 .It Fl l
231 Do
232 .Dq loose
233 permissions checks, in which more stringent permissions
234 will match less stringent ones.
235 For example, a file marked mode 0444
236 will pass a check for mode 0644.
237 .Dq Loose
238 checks apply only to read, write and execute permissions -- in
239 particular, if other bits like the sticky bit or suid/sgid bits are
240 set either in the specification or the file, exact checking will be
241 performed.
242 This option may not be set at the same time as the
243 .Fl U
244 or
245 .Fl u
246 option.
247 .It Fl M
248 Permit merging of specification entries with different types,
249 with the last entry taking precedence.
250 .It Fl m
251 If the schg and/or sappnd flags are specified, reset these flags.
252 Note that this is only possible with securelevel less than 1 (i.e.,
253 in single user mode or while the system is running in insecure
254 mode).
255 See
256 .Xr init 8
257 for information on security levels.
258 .It Fl n
259 Do not emit pathname comments when creating a specification.
260 Normally
261 a comment is emitted before each directory and before the close of that
262 directory when using the
263 .Fl c
264 option.
265 .It Fl N Ar dbdir
266 Use the user database text file
267 .Pa master.passwd
268 and group database text file
269 .Pa group
270 from
271 .Ar dbdir ,
272 rather than using the results from the system's
273 .Xr getpwnam 3
274 and
275 .Xr getgrnam 3
276 (and related) library calls.
277 .It Fl O Ar onlypaths
278 Only include files included in this list of pathnames.
279 .It Fl P
280 Don't follow symbolic links in the file hierarchy, instead consider
281 the symbolic link itself in any comparisons.
282 This is the default.
283 .It Fl p Ar path
284 Use the file hierarchy rooted in
285 .Ar path ,
286 instead of the current directory.
287 .It Fl q
288 Quiet mode.
289 Do not complain when a
290 .Dq missing
291 directory cannot be created because it already exists.
292 This occurs when the directory is a symbolic link.
293 .It Fl R Ar keywords
294 Remove the specified (whitespace or comma separated) keywords from the current
295 set of keywords.
296 If
297 .Ql all
298 is specified, remove all of the other keywords.
299 .It Fl r
300 Remove any files in the file hierarchy that are not described in the
301 specification.
302 Repeating the flag more than once will attempt to reset all the
303 file flags via
304 .Xr lchflags 2
305 before attempting to remove the file in case the file was immutable.
306 .It Fl S
307 When reading a specification into an internal data structure,
308 sort the entries.
309 Sorting will affect the order of the output produced by the
310 .Fl C
311 or
312 .Fl D
313 options, and will also affect the order in which
314 missing entries are created or reported when a directory tree is checked
315 against a specification.
316 .Pp
317 The sort order is the same as that used by the
318 .Fl c
319 option, which is that entries within the same directory are
320 sorted in the order used by
321 .Xr strcmp 3 ,
322 except that entries for subdirectories sort after other entries.
323 By default, if the
324 .Fl S
325 option is not used, entries within the same directory are collected
326 together (separated from entries for other directories), but not sorted.
327 .It Fl s Ar seed
328 Display a single checksum to the standard error output that represents all
329 of the files for which the keyword
330 .Sy cksum
331 was specified.
332 The checksum is seeded with the specified value.
333 .It Fl t
334 Modify the modified time of existing files, the device type of devices, and
335 symbolic link targets, to match the specification.
336 .It Fl U
337 Same as
338 .Fl u
339 except that a mismatch is not considered to be an error if it was corrected.
340 .It Fl u
341 Modify the owner, group, permissions, and flags of existing files,
342 the device type of devices, and symbolic link targets,
343 to match the specification.
344 Create any missing directories, devices or symbolic links.
345 User, group, and permissions must all be specified for missing directories
346 to be created.
347 Note that unless the
348 .Fl i
349 option is given, the schg and sappnd flags will not be set, even if
350 specified.
351 If
352 .Fl m
353 is given, these flags will be reset.
354 Exit with a status of 0 on success,
355 2 if the file hierarchy did not match the specification, and
356 1 if any other error occurred.
357 .It Fl W
358 Don't attempt to set various file attributes such as the
359 ownership, mode, flags, or time
360 when creating new directories or changing existing entries.
361 This option will be most useful when used in conjunction with
362 .Fl U
363 or
364 .Fl u .
365 .It Fl X Ar exclude-file
366 The specified file contains
367 .Xr fnmatch 3
368 patterns matching files to be excluded from
369 the specification, one to a line.
370 If the pattern contains a
371 .Ql \&/
372 character, it will be matched against entire pathnames (relative to
373 the starting directory); otherwise,
374 it will be matched against basenames only.
375 Comments are permitted in
376 the
377 .Ar exclude-list
378 file.
379 .It Fl x
380 Don't descend below mount points in the file hierarchy.
381 .El
382 .Pp
383 Specifications are mostly composed of
384 .Dq keywords ,
385 i.e. strings that specify values relating to files.
386 No keywords have default values, and if a keyword has no value set, no
387 checks based on it are performed.
388 .Pp
389 Currently supported keywords are as follows:
390 .Bl -tag -width sha384digestxx
391 .It Sy cksum
392 The checksum of the file using the default algorithm specified by
393 the
394 .Xr cksum 1
395 utility.
396 .It Sy device
397 The device number to use for
398 .Sy block
399 or
400 .Sy char
401 file types.
402 The argument must be one of the following forms:
403 .Bl -tag -width 4n
404 .It Ar format , Ns Ar major , Ns Ar minor
405 A device with
406 .Ar major
407 and
408 .Ar minor
409 fields, for an operating system specified with
410 .Ar format .
411 See below for valid formats.
412 .It Ar format , Ns Ar major , Ns Ar unit , Ns Ar subunit
413 A device with
414 .Ar major ,
415 .Ar unit ,
416 and
417 .Ar subunit
418 fields, for an operating system specified with
419 .Ar format .
420 (Currently this is only supported by the
421 .Sy bsdos
422 format.)
423 .It Ar number
424 Opaque number (as stored on the file system).
425 .El
426 .Pp
427 The following values for
428 .Ar format
429 are recognized:
430 .Sy native ,
431 .Sy 386bsd ,
432 .Sy 4bsd ,
433 .Sy bsdos ,
434 .Sy freebsd ,
435 .Sy hpux ,
436 .Sy isc ,
437 .Sy linux ,
438 .Sy netbsd ,
439 .Sy osf1 ,
440 .Sy sco ,
441 .Sy solaris ,
442 .Sy sunos ,
443 .Sy svr3 ,
444 .Sy svr4 ,
445 and
446 .Sy ultrix .
447 .It Sy flags
448 The file flags as a symbolic name.
449 See
450 .Xr chflags 1
451 for information on these names.
452 If no flags are to be set the string
453 .Ql none
454 may be used to override the current default.
455 Note that the schg and sappnd flags are treated specially (see the
456 .Fl i
457 and
458 .Fl m
459 options).
460 .It Sy ignore
461 Ignore any file hierarchy below this file.
462 .It Sy gid
463 The file group as a numeric value.
464 .It Sy gname
465 The file group as a symbolic name.
466 .It Sy link
467 The file the symbolic link is expected to reference.
468 .It Sy md5
469 The
470 .Tn MD5
471 cryptographic message digest of the file.
472 .It Sy md5digest
473 Synonym for
474 .Sy md5 .
475 .It Sy mode
476 The current file's permissions as a numeric (octal) or symbolic
477 value.
478 .It Sy nlink
479 The number of hard links the file is expected to have.
480 .It Sy nochange
481 Make sure this file or directory exists but otherwise ignore all attributes.
482 .It Sy optional
483 The file is optional; don't complain about the file if it's
484 not in the file hierarchy.
485 .It Sy ripemd160digest
486 Synonym for
487 .Sy rmd160 .
488 .It Sy rmd160
489 The
490 .Tn RMD-160
491 cryptographic message digest of the file.
492 .It Sy rmd160digest
493 Synonym for
494 .Sy rmd160 .
495 .It Sy sha1
496 The
497 .Tn SHA-1
498 cryptographic message digest of the file.
499 .It Sy sha1digest
500 Synonym for
501 .Sy sha1 .
502 .It Sy sha256
503 The 256-bits
504 .Tn SHA-2
505 cryptographic message digest of the file.
506 .It Sy sha256digest
507 Synonym for
508 .Sy sha256 .
509 .It Sy sha384
510 The 384-bits
511 .Tn SHA-2
512 cryptographic message digest of the file.
513 .It Sy sha384digest
514 Synonym for
515 .Sy sha384 .
516 .It Sy sha512
517 The 512-bits
518 .Tn SHA-2
519 cryptographic message digest of the file.
520 .It Sy sha512digest
521 Synonym for
522 .Sy sha512 .
523 .It Sy size
524 The size, in bytes, of the file.
525 .It Sy tags
526 Comma delimited tags to be matched with
527 .Fl E
528 and
529 .Fl I .
530 These may be specified without leading or trailing commas, but will be
531 stored internally with them.
532 .It Sy time
533 The last modification time of the file,
534 in second and nanoseconds.
535 The value should include a period character and exactly nine digits after
536 the period.
537 .It Sy type
538 The type of the file; may be set to any one of the following:
539 .Pp
540 .Bl -tag -width Sy -compact
541 .It Sy block
542 block special device
543 .It Sy char
544 character special device
545 .It Sy dir
546 directory
547 .It Sy fifo
548 fifo
549 .It Sy file
550 regular file
551 .It Sy link
552 symbolic link
553 .It Sy socket
554 socket
555 .El
556 .It Sy uid
557 The file owner as a numeric value.
558 .It Sy uname
559 The file owner as a symbolic name.
560 .El
561 .Pp
562 The default set of keywords are
563 .Sy flags ,
564 .Sy gid ,
565 .Sy link ,
566 .Sy mode ,
567 .Sy nlink ,
568 .Sy size ,
569 .Sy time ,
570 .Sy type ,
571 and
572 .Sy uid .
573 .Pp
574 There are four types of lines in a specification:
575 .Bl -enum
576 .It
577 Set global values for a keyword.
578 This consists of the string
579 .Ql /set
580 followed by whitespace, followed by sets of keyword/value
581 pairs, separated by whitespace.
582 Keyword/value pairs consist of a keyword, followed by an equals sign
583 .Pq Ql = ,
584 followed by a value, without whitespace characters.
585 Once a keyword has been set, its value remains unchanged until either
586 reset or unset.
587 .It
588 Unset global values for a keyword.
589 This consists of the string
590 .Ql /unset ,
591 followed by whitespace, followed by one or more keywords,
592 separated by whitespace.
593 If
594 .Ql all
595 is specified, unset all of the keywords.
596 .It
597 A file specification, consisting of a path name, followed by whitespace,
598 followed by zero or more whitespace separated keyword/value pairs.
599 .Pp
600 The path name may be preceded by whitespace characters.
601 The path name may contain any of the standard path name matching
602 characters
603 .Po
604 .Ql \&[ ,
605 .Ql \&] ,
606 .Ql \&?
607 or
608 .Ql *
609 .Pc ,
610 in which case files
611 in the hierarchy will be associated with the first pattern that
612 they match.
613 .Nm
614 uses
615 .Xr strsvis 3
616 (in VIS_CSTYLE format) to encode path names containing
617 non-printable characters.
618 Whitespace characters are encoded as
619 .Ql \es
620 (space),
621 .Ql \et
622 (tab), and
623 .Ql \en
624 (new line).
625 .Ql #
626 characters in path names are escaped by a preceding backslash
627 .Ql \e
628 to distinguish them from comments.
629 .Pp
630 Each of the keyword/value pairs consist of a keyword, followed by an
631 equals sign
632 .Pq Ql = ,
633 followed by the keyword's value, without
634 whitespace characters.
635 These values override, without changing, the global value of the
636 corresponding keyword.
637 .Pp
638 The first path name entry listed must be a directory named
639 .Ql \&. ,
640 as this ensures that intermixing full and relative path names will
641 work consistently and correctly.
642 Multiple entries for a directory named
643 .Ql \&.
644 are permitted; the settings for the last such entry override those
645 of the existing entry.
646 .Pp
647 A path name that contains a slash
648 .Pq Ql /
649 that is not the first character will be treated as a full path
650 (relative to the root of the tree).
651 All parent directories referenced in the path name must exist.
652 The current directory path used by relative path names will be updated
653 appropriately.
654 Multiple entries for the same full path are permitted if the types
655 are the same (unless
656 .Fl M
657 is given, in which case the types may differ);
658 in this case the settings for the last entry take precedence.
659 .Pp
660 A path name that does not contain a slash will be treated as a relative path.
661 Specifying a directory will cause subsequent files to be searched
662 for in that directory hierarchy.
663 .It
664 A line containing only the string
665 .Ql \&..
666 which causes the current directory path (used by relative paths)
667 to ascend one level.
668 .El
669 .Pp
670 Empty lines and lines whose first non-whitespace character is a hash
671 mark
672 .Pq Ql #
673 are ignored.
674 .Pp
675 The
676 .Nm
677 utility exits with a status of 0 on success, 1 if any error occurred,
678 and 2 if the file hierarchy did not match the specification.
679 .Sh FILES
680 .Bl -tag -width /etc/mtree -compact
681 .It Pa /etc/mtree
682 system specification directory
683 .El
684 .Sh EXIT STATUS
685 .Ex -std
686 .Sh EXAMPLES
687 To detect system binaries that have been
688 .Dq trojan horsed ,
689 it is recommended that
690 .Nm
691 be run on the file systems, and a copy of the results stored on a different
692 machine, or, at least, in encrypted form.
693 The seed for the
694 .Fl s
695 option should not be an obvious value and the final checksum should not be
696 stored on-line under any circumstances!
697 Then, periodically,
698 .Nm
699 should be run against the on-line specifications and the final checksum
700 compared with the previous value.
701 While it is possible for the bad guys to change the on-line specifications
702 to conform to their modified binaries, it shouldn't be possible for them
703 to make it produce the same final checksum value.
704 If the final checksum value changes, the off-line copies of the specification
705 can be used to detect which of the binaries have actually been modified.
706 .Pp
707 The
708 .Fl d
709 option can be used in combination with
710 .Fl U
711 or
712 .Fl u
713 to create directory hierarchies for distributions.
714 For example,
715 .Pp
716 .Dl mtree -deiU -f /etc/mtree/BSD.var.dist -p /var
717 .Pp
718 will create the
719 .Dq var
720 directory hierarchies at
721 .Pa /var ;
722 .Pp
723 .Dl mtree -deiU -f /etc/mtree/BSD.include.dist -p /usr/include
724 .Pp
725 will create the
726 .Dq include
727 directory hierarchies at
728 .Pa /usr/include .
729 .Sh COMPATIBILITY
730 The compatibility shims provided by the
731 .Fl F
732 option are incomplete by design.
733 Known limitations are described below.
734 .Pp
735 The
736 .Sy freebsd9
737 flavor retains the default handling of lookup failures for the
738 .Sy uname
739 and
740 .Sy group
741 keywords by replacing them with appropriate
742 .Sy uid
743 and
744 .Sy gid
745 keywords rather than failing and reporting an error.
746 The related
747 .Fl w
748 flag is a no-op rather than causing a warning to be printed and no
749 keyword to be emitted.
750 The latter behavior is not emulated as it is potentially dangerous in
751 the face of
752 .Ql /set
753 statements.
754 .Pp
755 The
756 .Sy netbsd6
757 flavor does not replicate the historical bug that reported time as
758 seconds.nanoseconds without zero padding nanosecond values less than
759 100000000.
760 .Sh SEE ALSO
761 .Xr chflags 1 ,
762 .Xr chgrp 1 ,
763 .Xr chmod 1 ,
764 .Xr cksum 1 ,
765 .Xr stat 2 ,
766 .Xr fnmatch 3 ,
767 .Xr fts 3 ,
768 .Xr strsvis 3 ,
769 .Xr chown 8
770 .Sh HISTORY
771 The
772 .Nm
773 utility appeared in
774 .Bx 4.3 Reno .
775 The
776 .Sy optional
777 keyword appeared in
778 .Nx 1.2 .
779 The
780 .Fl U
781 option appeared in
782 .Nx 1.3 .
783 The
784 .Sy flags
785 and
786 .Sy md5
787 keywords, and
788 .Fl i
789 and
790 .Fl m
791 options
792 appeared in
793 .Nx 1.4 .
794 The
795 .Sy device ,
796 .Sy rmd160 ,
797 .Sy sha1 ,
798 .Sy tags ,
799 and
800 .Sy all
801 keywords,
802 .Fl D ,
803 .Fl E ,
804 .Fl I ,
805 .Fl L ,
806 .Fl l ,
807 .Fl N ,
808 .Fl P ,
809 .Fl R ,
810 .Fl W ,
811 and
812 .Fl X
813 options, and support for full paths appeared in
814 .Nx 1.6 .
815 The
816 .Sy sha256 ,
817 .Sy sha384 ,
818 and
819 .Sy sha512
820 keywords appeared in
821 .Nx 3.0 .
822 The
823 .Fl S
824 option appeared in
825 .Nx 6.0 .