BSD 4_2 development
[unix-history] / usr / man / man8 / mkproto.8
CommitLineData
59e1e16e
C
1.TH MKPROTO 8 "10 May 1981"
2.UC 4
3.SH NAME
4mkproto \- construct a prototype file system
5.SH SYNOPSIS
6.B /etc/mkproto
7special proto
8.SH DESCRIPTION
9.I Mkproto
10is used to bootstrap a new file system.
11First a new file system is created using
12.IR newfs (8).
13.I Mkproto
14is then used to copy files from the old file system into the new
15file system according to the directions found in the prototype file
16.I proto.
17The prototype file
18contains tokens separated by spaces or
19new lines.
20The first tokens comprise the specification
21for the root directory.
22File specifications consist of tokens
23giving the mode,
24the user-id,
25the group id,
26and the initial contents of the file.
27The syntax of the contents field
28depends on the mode.
29.PP
30The mode token for a file is a 6 character string.
31The first character
32specifies the type of the file.
33(The characters
34.B \-bcd
35specify regular, block special,
36character special and directory files
37respectively.)
38The second character of the type
39is either
40.B u
41or
42.B \-
43to specify set-user-id mode or not.
44The third is
45.B g
46or
47.B \-
48for the set-group-id mode.
49The rest of the mode
50is a three digit octal number giving the
51owner, group, and other read, write, execute
52permissions, see
53.IR chmod (1).
54.PP
55Two decimal number
56tokens come after the mode; they specify the
57user and group ID's of the owner of the file.
58.PP
59If the file is a regular file,
60the next token is a pathname
61whence the contents and size are copied.
62.PP
63If the file is a block or character special file,
64two decimal number tokens
65follow which give the major and minor device numbers.
66.PP
67If the file is a directory,
68.I mkproto
69makes the entries
70.BR . ""
71and
72.B ..
73and then
74reads a list of names and
75(recursively)
76file specifications for the entries
77in the directory.
78The scan is terminated with the
79token
80.BR $ .
81.PP
82A sample prototype specification follows:
83.PP
84.nf
85.in +5
86d\-\-777 3 1
87usr d\-\-777 3 1
88 sh \-\-\-755 3 1 /bin/sh
89 ken d\-\-755 6 1
90 $
91 b0 b\-\-644 3 1 0 0
92 c0 c\-\-644 3 1 0 0
93 $
94$
95.in -5
96.fi
97.dt
98.SH "SEE ALSO"
99fs(5),
100dir(5),
101fsck(8),
102newfs(8)
103.SH BUGS
104There should be some way to specify links.
105.PP
106There should be some way to specify bad blocks.
107.PP
108Mkproto can only be run on virgin file systems.
109It should be possible to copy files into existent file systems.