summaryrefslogtreecommitdiff
path: root/man/8/mkfs
blob: 77a6fb8ec5f2448bf4c9405841df8735595fd8a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
.TH MKFS 8
.SH NAME
mkfs, mkext \- archive or update a file system
.SH SYNOPSIS
.B disk/mkfs
.RB [ -aprvxS ]
.RB [ -d
.IR dest ]
.RB [ -n
.IR name ]
.RB [ -s
.IR source ]
.RB [ -u
.IR users ]
.RB [ -z
.IR n ]
.RB [ -G
.IR group ]
.RB [ -U
.IR user ]
.I proto ...
.PP
.B disk/mkext
.RB [ -d
.IR name ]
.RB [ -f ]
.RB [ -h ]
.RB [ -T ]
.RB [ -u ]
.RB [ -v ]
[
.I file ...
]
.SH DESCRIPTION
.I Mkfs
copies files from the file tree
.I source
(default
.BR / )
to a
.B kfs
file system (see
.IR kfs (4))
assumed to be mounted on
.I dest
(default:
.BR /n/kfs ).
The
.I proto
files are read,
and any files specified in them that are out of date are copied to
.IR dest .
See
.IR proto (6)
for the description of file system prototype files.
.PP
.I Mkfs
by default copies only those files that are out of date.
Such a file is first copied into a temporary
file in the appropriate destination directory
and then moved to the destination file.
Files in the
.I kfs
file system that are not specified in the
.I proto
file
are not updated and not removed.
.PP
The options to
.I mkfs
are:
.TF "-s source"
.TP
.B -a
Instead of writing to a
.B kfs
file system, write an archive file to standard output, suitable for
.IR mkext .
All files in
.I proto
are archived,
not just those out of date.
.TP
.B -x
For use with
.BR -a ,
this option writes a list of file names, dates, and sizes to standard output
rather than producing an archive file.
.TP
.BI -n " name"
Use
.BI kfs. name .cmd
as the name of the command file for the
.IR kfs (4)
assumed to be mounted on
.IR dest .
.TP
.B -p
Update the permissions of a file even if it is up to date.
.TP
.B -r
Copy all files.
.TP
.BI -s " source"
Copy from files rooted at the tree
.IR source .
.TP
.BI -u " users"
Before copying any other file, copy file
.I users
into
.IB dest /adm/users ,
and if the
.B -n
option was given, also issue the
.IR kfs (4)
command
.B users
to update
.IR kfs 's
own user list.
.TP
.B -v
Print the names of all of the files as they are copied.
.TP
.BI -z " n"
Copy files assuming
.I kfs
is using a block size of
.I n
bytes
(default 1024).
If a block contains only 0-valued bytes, it is not copied.
.TP
.B -S
For use with the
.B -d
option,
make owner and group of each file copied match the original.
.TP
.BI -G " group"
Force all files copied to have the given
.IR group .
.TP
.BI -U " user"
Force all files copied to be owned by the given
.IR user .
.PD
.PP
.I Mkext
unpacks an archive created by the
.B -a
option of
.IR mkfs ,
read from the standard input.
If one or more files are specified on the command line,
only those files are unpacked.
If a
.I file
is a directory,
all files and subdirectories of that directory are also unpacked.
When a file is unpacked, the entire path is created if it
does not exist.
If no files are specified, the entire archive is unpacked;
in this case, missing intermediate directories are not created.
The options are:
.TP
.BI -d " dir"
Treat
.I dir
(default
.LR / )
as the root directory when unpacking the archive.
.TP
.B -h
Print headers for the files on standard output
instead of unpacking the files.
.TP
.B -T
Restore the modification times of the files.
.TP
.B -u
Set the owners of the files created to correspond to
those in the archive and restore the modification times of the files.
.TP
.B -v
Print the names and sizes of files as they are extracted.
.SH EXAMPLES
.PP
Make an archive to establish a new file system
(assuming that the output file
.B arch
is not referenced by
.BR proto ):
.IP
.EX
bind '#U' /n/local
disk/mkfs -a -s /n/local proto > arch
.EE
.PP
Unpack that archive on another machine:
.IP
.EX
mount tcp!server /n/remote
disk/mkext -u -d /n/remote < arch
.EE
.SH FILES
.TF /lib/proto/portproto
.TP
.B /lib/proto
directory of prototype files.
.TP
.B /lib/proto/all
contains a single + (archive any directory structure)
.SH SOURCE
.B /appl/cmd/disk/mkfs.b
.br
.B /appl/cmd/disk/mkext.b
.SH "SEE ALSO"
.IR fs (1),
.IR kfs (4),
.IR proto (6),
.IR kfscmd (8)