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