1 <!-- Creator : groff version 1.22.3 -->
2 <!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd">
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 }
23 <p>MTREE(5) BSD File Formats Manual MTREE(5)</p>
25 <p style="margin-top: 1em"><b>NAME</b></p>
27 <p style="margin-left:6%;"><b>mtree</b> — format of
28 mtree dir hierarchy files</p>
30 <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
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>
37 <p style="margin-left:6%; margin-top: 1em"><b>General
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>
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>
51 <p style="margin-left:6%; margin-top: 1em">Each line is
52 interpreted independently as one of the following types:</p>
54 <p style="margin-top: 1em">Blank</p>
56 <p style="margin-left:22%; margin-top: 1em">Blank lines are
59 <p style="margin-top: 1em">Comment</p>
61 <p style="margin-left:22%; margin-top: 1em">Lines beginning
62 with <b>#</b> are ignored.</p>
64 <p style="margin-top: 1em">Special</p>
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>
70 <p style="margin-top: 1em">Relative</p>
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
78 <p style="margin-top: 1em">dot-dot</p>
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>
85 <p style="margin-top: 1em">Full</p>
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>
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>
99 <p style="margin-left:6%; margin-top: 1em"><b>Special
101 Two special commands are currently defined:</p>
103 <p style="margin-top: 1em"><b>/set</b></p>
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
112 <p style="margin-top: 1em"><b>/unset</b></p>
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>
119 <p style="margin-left:6%; margin-top: 1em"><b>Keywords</b>
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 ’=’ sign and a value.
125 Software programs reading mtree files should warn about
126 unrecognized keywords.</p>
128 <p style="margin-left:6%; margin-top: 1em">Currently
129 supported keywords are as follows:</p>
131 <p style="margin-top: 1em"><b>cksum</b></p>
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>
137 <p style="margin-top: 1em"><b>device</b></p>
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>
144 <p style="margin-top: 1em"><i>format</i>,<i>major</i>,<i>minor</i>[
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’s system
151 <i>format</i>. See below for valid formats.</p>
153 <p style="margin-top: 1em"><i>number</i></p>
155 <p style="margin-left:29%;">Opaque number (as stored on the
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>
165 <p style="margin-left:22%; margin-top: 1em">See mknod(8)
166 for more details.</p>
168 <p style="margin-top: 1em"><b>contents</b></p>
170 <p style="margin-left:22%; margin-top: 1em">The full
171 pathname of a file that holds the contents of this file.</p>
173 <p style="margin-top: 1em"><b>flags</b></p>
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 ’’none’’ may be used to override the
181 <p style="margin-top: 1em"><b>gid</b></p>
183 <p style="margin-left:22%; margin-top: 1em">The file group
184 as a numeric value.</p>
186 <p style="margin-top: 1em"><b>gname</b></p>
188 <p style="margin-left:22%; margin-top: 1em">The file group
189 as a symbolic name.</p>
191 <p style="margin-top: 1em"><b>ignore</b></p>
193 <p style="margin-left:22%; margin-top: 1em">Ignore any file
194 hierarchy below this file.</p>
196 <p style="margin-top: 1em"><b>inode</b></p>
198 <p style="margin-left:22%; margin-top: 1em">The inode
201 <p style="margin-top: 1em"><b>link</b></p>
203 <p style="margin-left:22%; margin-top: 1em">The target of
204 the symbolic link when type=link.</p>
206 <p style="margin-top: 1em"><b>md5</b></p>
208 <p style="margin-left:22%; margin-top: 1em">The MD5 message
209 digest of the file.</p>
211 <p style="margin-top: 1em"><b>md5digest</b></p>
213 <p style="margin-left:22%; margin-top: 1em">A synonym for
216 <p style="margin-top: 1em"><b>mode</b></p>
218 <p style="margin-left:22%; margin-top: 1em">The current
219 file’s permissions as a numeric (octal) or symbolic
222 <p style="margin-top: 1em"><b>nlink</b></p>
224 <p style="margin-left:22%; margin-top: 1em">The number of
225 hard links the file is expected to have.</p>
227 <p style="margin-top: 1em"><b>nochange</b></p>
229 <p style="margin-left:22%; margin-top: 1em">Make sure this
230 file or directory exists but otherwise ignore all
233 <p style="margin-top: 1em"><b>optional</b></p>
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
239 <p style="margin-top: 1em"><b>resdevice</b></p>
241 <p style="margin-left:22%; margin-top: 1em">The
242 ’’resident’’ 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>
246 <p style="margin-top: 1em"><b>ripemd160digest</b></p>
248 <p style="margin-left:22%;">The RIPEMD160 message digest of
251 <p style="margin-top: 1em"><b>rmd160</b></p>
253 <p style="margin-left:22%; margin-top: 1em">A synonym for
254 <b>ripemd160digest</b>.</p>
256 <p style="margin-top: 1em"><b>rmd160digest</b></p>
258 <p style="margin-left:22%;">A synonym for
259 <b>ripemd160digest</b>.</p>
261 <p style="margin-top: 1em"><b>sha1</b></p>
263 <p style="margin-left:22%; margin-top: 1em">The FIPS 160-1
264 (’’SHA-1’’) message digest of the
267 <p style="margin-top: 1em"><b>sha1digest</b></p>
269 <p style="margin-left:22%; margin-top: 1em">A synonym for
272 <p style="margin-top: 1em"><b>sha256</b></p>
274 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
275 (’’SHA-256’’) message digest of the
278 <p style="margin-top: 1em"><b>sha256digest</b></p>
280 <p style="margin-left:22%;">A synonym for
283 <p style="margin-top: 1em"><b>sha384</b></p>
285 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
286 (’’SHA-384’’) message digest of the
289 <p style="margin-top: 1em"><b>sha384digest</b></p>
291 <p style="margin-left:22%;">A synonym for
294 <p style="margin-top: 1em"><b>sha512</b></p>
296 <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
297 (’’SHA-512’’) message digest of the
300 <p style="margin-top: 1em"><b>sha512digest</b></p>
302 <p style="margin-left:22%;">A synonym for
305 <p style="margin-top: 1em"><b>size</b></p>
307 <p style="margin-left:22%; margin-top: 1em">The size, in
308 bytes, of the file.</p>
310 <p style="margin-top: 1em"><b>time</b></p>
312 <p style="margin-left:22%; margin-top: 1em">The last
313 modification time of the file.</p>
315 <p style="margin-top: 1em"><b>type</b></p>
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>
320 <p style="margin-top: 1em"><b>block</b></p>
322 <p style="margin-left:37%; margin-top: 1em">block special
327 <p style="margin-left:37%; margin-top: 1em">character
332 <p style="margin-left:37%; margin-top: 1em">directory</p>
336 <p style="margin-left:37%; margin-top: 1em">fifo</p>
340 <p style="margin-left:37%; margin-top: 1em">regular
345 <p style="margin-left:37%; margin-top: 1em">symbolic
350 <p style="margin-left:37%; margin-top: 1em">socket</p>
352 <p style="margin-top: 1em"><b>uid</b></p>
354 <p style="margin-left:22%; margin-top: 1em">The file owner
355 as a numeric value.</p>
357 <p style="margin-top: 1em"><b>uname</b></p>
359 <p style="margin-left:22%; margin-top: 1em">The file owner
360 as a symbolic name.</p>
362 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
364 <p style="margin-left:6%;">cksum(1), find(1), mtree(8)</p>
366 <p style="margin-top: 1em"><b>BUGS <br>
369 <p style="margin-left:6%;">The <b>mtree</b> utility
370 appeared in 4.3BSD−Reno. The MD5 digest capability was
371 added in FreeBSD 2.1, in response to the widespread use
372 of programs which can spoof cksum(1). The SHA-1 and
373 RIPEMD160 digests were added in FreeBSD 4.0, as new
374 attacks have demonstrated weaknesses in MD5. The SHA-256
375 digest was added in FreeBSD 6.0. Support for file flags
376 was added in FreeBSD 4.0, and mostly comes from NetBSD.
377 The ’’full’’ entry format was added
380 <p style="margin-left:6%; margin-top: 1em">BSD
381 September 4, 2013 BSD</p>