Imported Upstream version 3.3.0
[platform/upstream/libarchive.git] / doc / html / mtree.5.html
1 <!-- Creator     : groff version 1.22.3 -->
2 <!-- CreationDate: Sun Feb 19 09:11:19 2017 -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd">
5 <html>
6 <head>
7 <meta name="generator" content="groff -Thtml, see www.gnu.org">
8 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9 <meta name="Content-Style" content="text/css">
10 <style type="text/css">
11        p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
12        pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
13        table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
14        h1      { text-align: center }
15 </style>
16 <title></title>
17 </head>
18 <body>
19
20 <hr>
21
22
23 <p>MTREE(5) BSD File Formats Manual MTREE(5)</p>
24
25 <p style="margin-top: 1em"><b>NAME</b></p>
26
27 <p style="margin-left:6%;"><b>mtree</b> &mdash; format of
28 mtree dir hierarchy files</p>
29
30 <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
31
32 <p style="margin-left:6%;">The <b>mtree</b> format is a
33 textual format that describes a collection of filesystem
34 objects. Such files are typically used to create or verify
35 directory hierarchies.</p>
36
37 <p style="margin-left:6%; margin-top: 1em"><b>General
38 Format</b> <br>
39 An <b>mtree</b> file consists of a series of lines, each
40 providing information about a single filesystem object.
41 Leading whitespace is always ignored.</p>
42
43 <p style="margin-left:6%; margin-top: 1em">When encoding
44 file or pathnames, any backslash character or character
45 outside of the 95 printable ASCII characters must be encoded
46 as a a backslash followed by three octal digits. When
47 reading mtree files, any appearance of a backslash followed
48 by three octal digits should be converted into the
49 corresponding character.</p>
50
51 <p style="margin-left:6%; margin-top: 1em">Each line is
52 interpreted independently as one of the following types:</p>
53
54 <p style="margin-top: 1em">Blank</p>
55
56 <p style="margin-left:22%; margin-top: 1em">Blank lines are
57 ignored.</p>
58
59 <p style="margin-top: 1em">Comment</p>
60
61 <p style="margin-left:22%; margin-top: 1em">Lines beginning
62 with <b>#</b> are ignored.</p>
63
64 <p style="margin-top: 1em">Special</p>
65
66 <p style="margin-left:22%; margin-top: 1em">Lines beginning
67 with <b>/</b> are special commands that influence the
68 interpretation of later lines.</p>
69
70 <p style="margin-top: 1em">Relative</p>
71
72 <p style="margin-left:22%; margin-top: 1em">If the first
73 whitespace-delimited word has no <b>/</b> characters, it is
74 the name of a file in the current directory. Any relative
75 entry that describes a directory changes the current
76 directory.</p>
77
78 <p style="margin-top: 1em">dot-dot</p>
79
80 <p style="margin-left:22%; margin-top: 1em">As a special
81 case, a relative entry with the filename <i>..</i> changes
82 the current directory to the parent directory. Options on
83 dot-dot entries are always ignored.</p>
84
85 <p style="margin-top: 1em">Full</p>
86
87 <p style="margin-left:22%; margin-top: 1em">If the first
88 whitespace-delimited word has a <b>/</b> character after the
89 first character, it is the pathname of a file relative to
90 the starting directory. There can be multiple full entries
91 describing the same file.</p>
92
93 <p style="margin-left:6%; margin-top: 1em">Some tools that
94 process <b>mtree</b> files may require that multiple lines
95 describing the same file occur consecutively. It is not
96 permitted for the same file to be mentioned using both a
97 relative and a full file specification.</p>
98
99 <p style="margin-left:6%; margin-top: 1em"><b>Special
100 commands</b> <br>
101 Two special commands are currently defined:</p>
102
103 <p style="margin-top: 1em"><b>/set</b></p>
104
105 <p style="margin-left:22%; margin-top: 1em">This command
106 defines default values for one or more keywords. It is
107 followed on the same line by one or more
108 whitespace-separated keyword definitions. These definitions
109 apply to all following files that do not specify a value for
110 that keyword.</p>
111
112 <p style="margin-top: 1em"><b>/unset</b></p>
113
114 <p style="margin-left:22%; margin-top: 1em">This command
115 removes any default value set by a previous <b>/set</b>
116 command. It is followed on the same line by one or more
117 keywords separated by whitespace.</p>
118
119 <p style="margin-left:6%; margin-top: 1em"><b>Keywords</b>
120 <br>
121 After the filename, a full or relative entry consists of
122 zero or more whitespace-separated keyword definitions. Each
123 such definition consists of a key from the following list
124 immediately followed by an &rsquo;=&rsquo; sign and a value.
125 Software programs reading mtree files should warn about
126 unrecognized keywords.</p>
127
128 <p style="margin-left:6%; margin-top: 1em">Currently
129 supported keywords are as follows:</p>
130
131 <p style="margin-top: 1em"><b>cksum</b></p>
132
133 <p style="margin-left:22%; margin-top: 1em">The checksum of
134 the file using the default algorithm specified by the
135 cksum(1) utility.</p>
136
137 <p style="margin-top: 1em"><b>device</b></p>
138
139 <p style="margin-left:22%; margin-top: 1em">The device
140 number for <b>block</b> or <b>char</b> file types. The value
141 must be one of the following forms:</p>
142
143
144 <p style="margin-top: 1em"><i>format</i>,<i>major</i>,<i>minor</i>[
145 <br>
146 ,<i>subunit</i>]</p>
147
148 <p style="margin-left:29%;">A device with <i>major</i>,
149 <i>minor</i> and optional <i>subunit</i> fields. Their
150 meaning is specified by the operating&rsquo;s system
151 <i>format</i>. See below for valid formats.</p>
152
153 <p style="margin-top: 1em"><i>number</i></p>
154
155 <p style="margin-left:29%;">Opaque number (as stored on the
156 file system).</p>
157
158 <p style="margin-left:22%; margin-top: 1em">The following
159 values for <i>format</i> are recognized: <b>native</b>,
160 <b>386bsd</b>, <b>4bsd</b>, <b>bsdos</b>, <b>freebsd</b>,
161 <b>hpux</b>, <b>isc</b>, <b>linux</b>, <b>netbsd</b>,
162 <b>osf1</b>, <b>sco</b>, <b>solaris</b>, <b>sunos</b>,
163 <b>svr3</b>, <b>svr4</b>, and <b>ultrix</b>.</p>
164
165 <p style="margin-left:22%; margin-top: 1em">See mknod(8)
166 for more details.</p>
167
168 <p style="margin-top: 1em"><b>contents</b></p>
169
170 <p style="margin-left:22%; margin-top: 1em">The full
171 pathname of a file that holds the contents of this file.</p>
172
173 <p style="margin-top: 1em"><b>flags</b></p>
174
175 <p style="margin-left:22%; margin-top: 1em">The file flags
176 as a symbolic name. See chflags(1) for information on these
177 names. If no flags are to be set the string
178 &rsquo;&rsquo;none&rsquo;&rsquo; may be used to override the
179 current default.</p>
180
181 <p style="margin-top: 1em"><b>gid</b></p>
182
183 <p style="margin-left:22%; margin-top: 1em">The file group
184 as a numeric value.</p>
185
186 <p style="margin-top: 1em"><b>gname</b></p>
187
188 <p style="margin-left:22%; margin-top: 1em">The file group
189 as a symbolic name.</p>
190
191 <p style="margin-top: 1em"><b>ignore</b></p>
192
193 <p style="margin-left:22%; margin-top: 1em">Ignore any file
194 hierarchy below this file.</p>
195
196 <p style="margin-top: 1em"><b>inode</b></p>
197
198 <p style="margin-left:22%; margin-top: 1em">The inode
199 number.</p>
200
201 <p style="margin-top: 1em"><b>link</b></p>
202
203 <p style="margin-left:22%; margin-top: 1em">The target of
204 the symbolic link when type=link.</p>
205
206 <p style="margin-top: 1em"><b>md5</b></p>
207
208 <p style="margin-left:22%; margin-top: 1em">The MD5 message
209 digest of the file.</p>
210
211 <p style="margin-top: 1em"><b>md5digest</b></p>
212
213 <p style="margin-left:22%; margin-top: 1em">A synonym for
214 <b>md5</b>.</p>
215
216 <p style="margin-top: 1em"><b>mode</b></p>
217
218 <p style="margin-left:22%; margin-top: 1em">The current
219 file&rsquo;s permissions as a numeric (octal) or symbolic
220 value.</p>
221
222 <p style="margin-top: 1em"><b>nlink</b></p>
223
224 <p style="margin-left:22%; margin-top: 1em">The number of
225 hard links the file is expected to have.</p>
226
227 <p style="margin-top: 1em"><b>nochange</b></p>
228
229 <p style="margin-left:22%; margin-top: 1em">Make sure this
230 file or directory exists but otherwise ignore all
231 attributes.</p>
232
233 <p style="margin-top: 1em"><b>optional</b></p>
234
235 <p style="margin-left:22%; margin-top: 1em">The file is
236 optional; do not complain about the file if it is not in the
237 file hierarchy.</p>
238
239 <p style="margin-top: 1em"><b>resdevice</b></p>
240
241 <p style="margin-left:22%; margin-top: 1em">The
242 &rsquo;&rsquo;resident&rsquo;&rsquo; device number of the
243 file, e.g. the ID of the device that contains the file. Its
244 format is the same as the one for <b>device</b>.</p>
245
246 <p style="margin-top: 1em"><b>ripemd160digest</b></p>
247
248 <p style="margin-left:22%;">The RIPEMD160 message digest of
249 the file.</p>
250
251 <p style="margin-top: 1em"><b>rmd160</b></p>
252
253 <p style="margin-left:22%; margin-top: 1em">A synonym for
254 <b>ripemd160digest</b>.</p>
255
256 <p style="margin-top: 1em"><b>rmd160digest</b></p>
257
258 <p style="margin-left:22%;">A synonym for
259 <b>ripemd160digest</b>.</p>
260
261 <p style="margin-top: 1em"><b>sha1</b></p>
262
263 <p style="margin-left:22%; margin-top: 1em">The FIPS 160-1
264 (&rsquo;&rsquo;SHA-1&rsquo;&rsquo;) message digest of the
265 file.</p>
266
267 <p style="margin-top: 1em"><b>sha1digest</b></p>
268
269 <p style="margin-left:22%; margin-top: 1em">A synonym for
270 <b>sha1</b>.</p>
271
272 <p style="margin-top: 1em"><b>sha256</b></p>
273
274 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
275 (&rsquo;&rsquo;SHA-256&rsquo;&rsquo;) message digest of the
276 file.</p>
277
278 <p style="margin-top: 1em"><b>sha256digest</b></p>
279
280 <p style="margin-left:22%;">A synonym for
281 <b>sha256</b>.</p>
282
283 <p style="margin-top: 1em"><b>sha384</b></p>
284
285 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
286 (&rsquo;&rsquo;SHA-384&rsquo;&rsquo;) message digest of the
287 file.</p>
288
289 <p style="margin-top: 1em"><b>sha384digest</b></p>
290
291 <p style="margin-left:22%;">A synonym for
292 <b>sha384</b>.</p>
293
294 <p style="margin-top: 1em"><b>sha512</b></p>
295
296 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
297 (&rsquo;&rsquo;SHA-512&rsquo;&rsquo;) message digest of the
298 file.</p>
299
300 <p style="margin-top: 1em"><b>sha512digest</b></p>
301
302 <p style="margin-left:22%;">A synonym for
303 <b>sha512</b>.</p>
304
305 <p style="margin-top: 1em"><b>size</b></p>
306
307 <p style="margin-left:22%; margin-top: 1em">The size, in
308 bytes, of the file.</p>
309
310 <p style="margin-top: 1em"><b>time</b></p>
311
312 <p style="margin-left:22%; margin-top: 1em">The last
313 modification time of the file.</p>
314
315 <p style="margin-top: 1em"><b>type</b></p>
316
317 <p style="margin-left:22%; margin-top: 1em">The type of the
318 file; may be set to any one of the following:</p>
319
320 <p style="margin-top: 1em"><b>block</b></p>
321
322 <p style="margin-left:37%; margin-top: 1em">block special
323 device</p>
324
325 <p><b>char</b></p>
326
327 <p style="margin-left:37%; margin-top: 1em">character
328 special device</p>
329
330 <p><b>dir</b></p>
331
332 <p style="margin-left:37%; margin-top: 1em">directory</p>
333
334 <p><b>fifo</b></p>
335
336 <p style="margin-left:37%; margin-top: 1em">fifo</p>
337
338 <p><b>file</b></p>
339
340 <p style="margin-left:37%; margin-top: 1em">regular
341 file</p>
342
343 <p><b>link</b></p>
344
345 <p style="margin-left:37%; margin-top: 1em">symbolic
346 link</p>
347
348 <p><b>socket</b></p>
349
350 <p style="margin-left:37%; margin-top: 1em">socket</p>
351
352 <p style="margin-top: 1em"><b>uid</b></p>
353
354 <p style="margin-left:22%; margin-top: 1em">The file owner
355 as a numeric value.</p>
356
357 <p style="margin-top: 1em"><b>uname</b></p>
358
359 <p style="margin-left:22%; margin-top: 1em">The file owner
360 as a symbolic name.</p>
361
362 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
363
364 <p style="margin-left:6%;">cksum(1), find(1), mtree(8)</p>
365
366 <p style="margin-top: 1em"><b>BUGS <br>
367 HISTORY</b></p>
368
369 <p style="margin-left:6%;">The <b>mtree</b> utility
370 appeared in 4.3BSD-Reno. The MD5 digest capability was added
371 in FreeBSD&nbsp;2.1, in response to the widespread use of
372 programs which can spoof cksum(1). The SHA-1 and RIPEMD160
373 digests were added in FreeBSD&nbsp;4.0, as new attacks have
374 demonstrated weaknesses in MD5. The SHA-256 digest was added
375 in FreeBSD&nbsp;6.0. Support for file flags was added in
376 FreeBSD&nbsp;4.0, and mostly comes from NetBSD. The
377 &rsquo;&rsquo;full&rsquo;&rsquo; entry format was added by
378 NetBSD.</p>
379
380 <p style="margin-left:6%; margin-top: 1em">BSD
381 September&nbsp;4, 2013 BSD</p>
382 <hr>
383 </body>
384 </html>