mtree.5.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <!-- Creator : groff version 1.22.4 -->
  2. <!-- CreationDate: Tue Jul 18 07:11:07 2023 -->
  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. <hr>
  20. <p>MTREE(5) BSD File Formats Manual MTREE(5)</p>
  21. <p style="margin-top: 1em"><b>NAME</b></p>
  22. <p style="margin-left:6%;"><b>mtree</b> &mdash; format of
  23. mtree dir hierarchy files</p>
  24. <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
  25. <p style="margin-left:6%;">The <b>mtree</b> format is a
  26. textual format that describes a collection of filesystem
  27. objects. Such files are typically used to create or verify
  28. directory hierarchies.</p>
  29. <p style="margin-left:6%; margin-top: 1em"><b>General
  30. Format</b> <br>
  31. An <b>mtree</b> file consists of a series of lines, each
  32. providing information about a single filesystem object.
  33. Leading whitespace is always ignored.</p>
  34. <p style="margin-left:6%; margin-top: 1em">When encoding
  35. file or pathnames, any backslash character or character
  36. outside of the 95 printable ASCII characters must be encoded
  37. as a backslash followed by three octal digits. When reading
  38. mtree files, any appearance of a backslash followed by three
  39. octal digits should be converted into the corresponding
  40. character.</p>
  41. <p style="margin-left:6%; margin-top: 1em">Each line is
  42. interpreted independently as one of the following types:</p>
  43. <p style="margin-top: 1em">Blank</p>
  44. <p style="margin-left:22%; margin-top: 1em">Blank lines are
  45. ignored.</p>
  46. <p style="margin-top: 1em">Comment</p>
  47. <p style="margin-left:22%; margin-top: 1em">Lines beginning
  48. with <b>#</b> are ignored.</p>
  49. <p style="margin-top: 1em">Special</p>
  50. <p style="margin-left:22%; margin-top: 1em">Lines beginning
  51. with <b>/</b> are special commands that influence the
  52. interpretation of later lines.</p>
  53. <p style="margin-top: 1em">Relative</p>
  54. <p style="margin-left:22%; margin-top: 1em">If the first
  55. whitespace-delimited word has no <b>/</b> characters, it is
  56. the name of a file in the current directory. Any relative
  57. entry that describes a directory changes the current
  58. directory.</p>
  59. <p style="margin-top: 1em">dot-dot</p>
  60. <p style="margin-left:22%; margin-top: 1em">As a special
  61. case, a relative entry with the filename <i>..</i> changes
  62. the current directory to the parent directory. Options on
  63. dot-dot entries are always ignored.</p>
  64. <p style="margin-top: 1em">Full</p>
  65. <p style="margin-left:22%; margin-top: 1em">If the first
  66. whitespace-delimited word has a <b>/</b> character after the
  67. first character, it is the pathname of a file relative to
  68. the starting directory. There can be multiple full entries
  69. describing the same file.</p>
  70. <p style="margin-left:6%; margin-top: 1em">Some tools that
  71. process <b>mtree</b> files may require that multiple lines
  72. describing the same file occur consecutively. It is not
  73. permitted for the same file to be mentioned using both a
  74. relative and a full file specification.</p>
  75. <p style="margin-left:6%; margin-top: 1em"><b>Special
  76. commands</b> <br>
  77. Two special commands are currently defined:</p>
  78. <p style="margin-top: 1em"><b>/set</b></p>
  79. <p style="margin-left:22%; margin-top: 1em">This command
  80. defines default values for one or more keywords. It is
  81. followed on the same line by one or more
  82. whitespace-separated keyword definitions. These definitions
  83. apply to all following files that do not specify a value for
  84. that keyword.</p>
  85. <p style="margin-top: 1em"><b>/unset</b></p>
  86. <p style="margin-left:22%; margin-top: 1em">This command
  87. removes any default value set by a previous <b>/set</b>
  88. command. It is followed on the same line by one or more
  89. keywords separated by whitespace.</p>
  90. <p style="margin-left:6%; margin-top: 1em"><b>Keywords</b>
  91. <br>
  92. After the filename, a full or relative entry consists of
  93. zero or more whitespace-separated keyword definitions. Each
  94. such definition consists of a key from the following list
  95. immediately followed by an &rsquo;=&rsquo; sign and a value.
  96. Software programs reading mtree files should warn about
  97. unrecognized keywords.</p>
  98. <p style="margin-left:6%; margin-top: 1em">Currently
  99. supported keywords are as follows:</p>
  100. <p style="margin-top: 1em"><b>cksum</b></p>
  101. <p style="margin-left:22%; margin-top: 1em">The checksum of
  102. the file using the default algorithm specified by the
  103. cksum(1) utility.</p>
  104. <p style="margin-top: 1em"><b>device</b></p>
  105. <p style="margin-left:22%; margin-top: 1em">The device
  106. number for <b>block</b> or <b>char</b> file types. The value
  107. must be one of the following forms:</p>
  108. <p style="margin-top: 1em"><i>format</i>,<i>major</i>,<i>minor</i>[
  109. <br>
  110. ,<i>subunit</i>]</p>
  111. <p style="margin-left:29%;">A device with <i>major</i>,
  112. <i>minor</i> and optional <i>subunit</i> fields. Their
  113. meaning is specified by the operating&rsquo;s system
  114. <i>format</i>. See below for valid formats.</p>
  115. <p style="margin-top: 1em"><i>number</i></p>
  116. <p style="margin-left:29%;">Opaque number (as stored on the
  117. file system).</p>
  118. <p style="margin-left:22%; margin-top: 1em">The following
  119. values for <i>format</i> are recognized: <b>native</b>,
  120. <b>386bsd</b>, <b>4bsd</b>, <b>bsdos</b>, <b>freebsd</b>,
  121. <b>hpux</b>, <b>isc</b>, <b>linux</b>, <b>netbsd</b>,
  122. <b>osf1</b>, <b>sco</b>, <b>solaris</b>, <b>sunos</b>,
  123. <b>svr3</b>, <b>svr4</b>, and <b>ultrix</b>.</p>
  124. <p style="margin-left:22%; margin-top: 1em">See mknod(8)
  125. for more details.</p>
  126. <p style="margin-top: 1em"><b>contents</b></p>
  127. <p style="margin-left:22%; margin-top: 1em">The full
  128. pathname of a file that holds the contents of this file.</p>
  129. <p style="margin-top: 1em"><b>flags</b></p>
  130. <p style="margin-left:22%; margin-top: 1em">The file flags
  131. as a symbolic name. See chflags(1) for information on these
  132. names. If no flags are to be set the string
  133. &ldquo;none&rdquo; may be used to override the current
  134. default.</p>
  135. <p style="margin-top: 1em"><b>gid</b></p>
  136. <p style="margin-left:22%; margin-top: 1em">The file group
  137. as a numeric value.</p>
  138. <p style="margin-top: 1em"><b>gname</b></p>
  139. <p style="margin-left:22%; margin-top: 1em">The file group
  140. as a symbolic name.</p>
  141. <p style="margin-top: 1em"><b>ignore</b></p>
  142. <p style="margin-left:22%; margin-top: 1em">Ignore any file
  143. hierarchy below this file.</p>
  144. <p style="margin-top: 1em"><b>inode</b></p>
  145. <p style="margin-left:22%; margin-top: 1em">The inode
  146. number.</p>
  147. <p style="margin-top: 1em"><b>link</b></p>
  148. <p style="margin-left:22%; margin-top: 1em">The target of
  149. the symbolic link when type=link.</p>
  150. <p style="margin-top: 1em"><b>md5</b></p>
  151. <p style="margin-left:22%; margin-top: 1em">The MD5 message
  152. digest of the file.</p>
  153. <p style="margin-top: 1em"><b>md5digest</b></p>
  154. <p style="margin-left:22%; margin-top: 1em">A synonym for
  155. <b>md5</b>.</p>
  156. <p style="margin-top: 1em"><b>mode</b></p>
  157. <p style="margin-left:22%; margin-top: 1em">The current
  158. file&rsquo;s permissions as a numeric (octal) or symbolic
  159. value.</p>
  160. <p style="margin-top: 1em"><b>nlink</b></p>
  161. <p style="margin-left:22%; margin-top: 1em">The number of
  162. hard links the file is expected to have.</p>
  163. <p style="margin-top: 1em"><b>nochange</b></p>
  164. <p style="margin-left:22%; margin-top: 1em">Make sure this
  165. file or directory exists but otherwise ignore all
  166. attributes.</p>
  167. <p style="margin-top: 1em"><b>optional</b></p>
  168. <p style="margin-left:22%; margin-top: 1em">The file is
  169. optional; do not complain about the file if it is not in the
  170. file hierarchy.</p>
  171. <p style="margin-top: 1em"><b>resdevice</b></p>
  172. <p style="margin-left:22%; margin-top: 1em">The
  173. &ldquo;resident&rdquo; device number of the file, e.g. the
  174. ID of the device that contains the file. Its format is the
  175. same as the one for <b>device</b>.</p>
  176. <p style="margin-top: 1em"><b>ripemd160digest</b></p>
  177. <p style="margin-left:22%;">The RIPEMD160 message digest of
  178. the file.</p>
  179. <p style="margin-top: 1em"><b>rmd160</b></p>
  180. <p style="margin-left:22%; margin-top: 1em">A synonym for
  181. <b>ripemd160digest</b>.</p>
  182. <p style="margin-top: 1em"><b>rmd160digest</b></p>
  183. <p style="margin-left:22%;">A synonym for
  184. <b>ripemd160digest</b>.</p>
  185. <p style="margin-top: 1em"><b>sha1</b></p>
  186. <p style="margin-left:22%; margin-top: 1em">The FIPS 160-1
  187. (&ldquo;SHA-1&rdquo;) message digest of the file.</p>
  188. <p style="margin-top: 1em"><b>sha1digest</b></p>
  189. <p style="margin-left:22%; margin-top: 1em">A synonym for
  190. <b>sha1</b>.</p>
  191. <p style="margin-top: 1em"><b>sha256</b></p>
  192. <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
  193. (&ldquo;SHA-256&rdquo;) message digest of the file.</p>
  194. <p style="margin-top: 1em"><b>sha256digest</b></p>
  195. <p style="margin-left:22%;">A synonym for
  196. <b>sha256</b>.</p>
  197. <p style="margin-top: 1em"><b>sha384</b></p>
  198. <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
  199. (&ldquo;SHA-384&rdquo;) message digest of the file.</p>
  200. <p style="margin-top: 1em"><b>sha384digest</b></p>
  201. <p style="margin-left:22%;">A synonym for
  202. <b>sha384</b>.</p>
  203. <p style="margin-top: 1em"><b>sha512</b></p>
  204. <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
  205. (&ldquo;SHA-512&rdquo;) message digest of the file.</p>
  206. <p style="margin-top: 1em"><b>sha512digest</b></p>
  207. <p style="margin-left:22%;">A synonym for
  208. <b>sha512</b>.</p>
  209. <p style="margin-top: 1em"><b>size</b></p>
  210. <p style="margin-left:22%; margin-top: 1em">The size, in
  211. bytes, of the file.</p>
  212. <p style="margin-top: 1em"><b>time</b></p>
  213. <p style="margin-left:22%; margin-top: 1em">The last
  214. modification time of the file.</p>
  215. <p style="margin-top: 1em"><b>type</b></p>
  216. <p style="margin-left:22%; margin-top: 1em">The type of the
  217. file; may be set to any one of the following:</p>
  218. <p style="margin-top: 1em"><b>block</b></p>
  219. <p style="margin-left:37%; margin-top: 1em">block special
  220. device</p>
  221. <p><b>char</b></p>
  222. <p style="margin-left:37%; margin-top: 1em">character
  223. special device</p>
  224. <p><b>dir</b></p>
  225. <p style="margin-left:37%; margin-top: 1em">directory</p>
  226. <p><b>fifo</b></p>
  227. <p style="margin-left:37%; margin-top: 1em">fifo</p>
  228. <p><b>file</b></p>
  229. <p style="margin-left:37%; margin-top: 1em">regular
  230. file</p>
  231. <p><b>link</b></p>
  232. <p style="margin-left:37%; margin-top: 1em">symbolic
  233. link</p>
  234. <p><b>socket</b></p>
  235. <p style="margin-left:37%; margin-top: 1em">socket</p>
  236. <p style="margin-top: 1em"><b>uid</b></p>
  237. <p style="margin-left:22%; margin-top: 1em">The file owner
  238. as a numeric value.</p>
  239. <p style="margin-top: 1em"><b>uname</b></p>
  240. <p style="margin-left:22%; margin-top: 1em">The file owner
  241. as a symbolic name.</p>
  242. <p style="margin-top: 1em"><b>SEE ALSO</b></p>
  243. <p style="margin-left:6%;">cksum(1), find(1), mtree(8)</p>
  244. <p style="margin-top: 1em"><b>HISTORY</b></p>
  245. <p style="margin-left:6%;">The <b>mtree</b> utility
  246. appeared in 4.3BSD-Reno. The MD5 digest capability was added
  247. in FreeBSD&nbsp;2.1, in response to the widespread use of
  248. programs which can spoof cksum(1). The SHA-1 and RIPEMD160
  249. digests were added in FreeBSD&nbsp;4.0, as new attacks have
  250. demonstrated weaknesses in MD5. The SHA-256 digest was added
  251. in FreeBSD&nbsp;6.0. Support for file flags was added in
  252. FreeBSD&nbsp;4.0, and mostly comes from NetBSD. The
  253. &ldquo;full&rdquo; entry format was added by NetBSD.</p>
  254. <p style="margin-left:6%; margin-top: 1em">BSD
  255. September&nbsp;4, 2013 BSD</p>
  256. <hr>
  257. </body>
  258. </html>