mtree.5.html   [plain text]


<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Sun Mar 14 19:50:32 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">MTREE(5) FreeBSD File Formats Manual
MTREE(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>mtree</b> &mdash; format of
mtree dir hierarchy files</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>mtree</b> format is a
textual format that describes a collection of filesystem
objects. Such files are typically used to create or verify
directory hierarchies.</p>

<p style="margin-left:8%; margin-top: 1em"><b>General
Format</b> <br>
An <b>mtree</b> file consists of a series of lines, each
providing information about a single filesystem object.
Leading whitespace is always ignored.</p>

<p style="margin-left:8%; margin-top: 1em">When encoding
file or pathnames, any backslash character or character
outside of the 95 printable ASCII characters must be encoded
as a a backslash followed by three octal digits. When
reading mtree files, any appearance of a backslash followed
by three octal digits should be converted into the
corresponding character.</p>

<p style="margin-left:8%; margin-top: 1em">Each line is
interpreted independently as one of the following types:</p>

<p style="margin-top: 1em" valign="top">Signature</p>

<p style="margin-left:26%; margin-top: 1em">The first line
of any mtree file must begin with
&lsquo;&lsquo;#mtree&rsquo;&rsquo;. If a file contains any
full path entries, the first line should begin with
&lsquo;&lsquo;#mtree v2.0&rsquo;&rsquo;, otherwise, the
first line should begin with &lsquo;&lsquo;#mtree
v1.0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em" valign="top">Blank</p>

<p style="margin-left:26%; margin-top: 1em">Blank lines are
ignored.</p>

<p style="margin-top: 1em" valign="top">Comment</p>

<p style="margin-left:26%; margin-top: 1em">Lines beginning
with <b>#</b> are ignored.</p>

<p style="margin-top: 1em" valign="top">Special</p>

<p style="margin-left:26%; margin-top: 1em">Lines beginning
with <b>/</b> are special commands that influence the
interpretation of later lines.</p>

<p style="margin-top: 1em" valign="top">Relative</p>

<p style="margin-left:26%; margin-top: 1em">If the first
whitespace-delimited word has no <b>/</b> characters, it is
the name of a file in the current directory. Any relative
entry that describes a directory changes the current
directory.</p>

<p style="margin-top: 1em" valign="top">dot-dot</p>

<p style="margin-left:26%; margin-top: 1em">As a special
case, a relative entry with the filename <i>..</i> changes
the current directory to the parent directory. Options on
dot-dot entries are always ignored.</p>

<p style="margin-top: 1em" valign="top">Full</p>

<p style="margin-left:26%; margin-top: 1em">If the first
whitespace-delimited word has a <b>/</b> character after the
first character, it is the pathname of a file relative to
the starting directory. There can be multiple full entries
describing the same file.</p>

<p style="margin-left:8%; margin-top: 1em">Some tools that
process <b>mtree</b> files may require that multiple lines
describing the same file occur consecutively. It is not
permitted for the same file to be mentioned using both a
relative and a full file specification.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Special
commands</b> <br>
Two special commands are currently defined:</p>

<p style="margin-top: 1em" valign="top"><b>/set</b></p>

<p style="margin-left:26%; margin-top: 1em">This command
defines default values for one or more keywords. It is
followed on the same line by one or more
whitespace-separated keyword definitions. These definitions
apply to all following files that do not specify a value for
that keyword.</p>

<p style="margin-top: 1em" valign="top"><b>/unset</b></p>

<p style="margin-left:26%; margin-top: 1em">This command
removes any default value set by a previous <b>/set</b>
command. It is followed on the same line by one or more
keywords separated by whitespace.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Keywords</b>
<br>
After the filename, a full or relative entry consists of
zero or more whitespace-separated keyword definitions. Each
such definition consists of a key from the following list
immediately followed by an &rsquo;=&rsquo; sign and a value.
Software programs reading mtree files should warn about
unrecognized keywords.</p>

<p style="margin-left:8%; margin-top: 1em">Currently
supported keywords are as follows:</p>

<p style="margin-top: 1em" valign="top"><b>cksum</b></p>

<p style="margin-left:26%; margin-top: 1em">The checksum of
the file using the default algorithm specified by the
cksum(1) utility.</p>


<p style="margin-top: 1em" valign="top"><b>contents</b></p>

<p style="margin-left:26%; margin-top: 1em">The full
pathname of a file that holds the contents of this file.</p>

<p style="margin-top: 1em" valign="top"><b>flags</b></p>

<p style="margin-left:26%; margin-top: 1em">The file flags
as a symbolic name. See chflags(1) for information on these
names. If no flags are to be set the string
&lsquo;&lsquo;none&rsquo;&rsquo; may be used to override the
current default.</p>

<p style="margin-top: 1em" valign="top"><b>gid</b></p>

<p style="margin-left:26%; margin-top: 1em">The file group
as a numeric value.</p>

<p style="margin-top: 1em" valign="top"><b>gname</b></p>

<p style="margin-left:26%; margin-top: 1em">The file group
as a symbolic name.</p>

<p style="margin-top: 1em" valign="top"><b>ignore</b></p>

<p style="margin-left:26%; margin-top: 1em">Ignore any file
hierarchy below this file.</p>

<p style="margin-top: 1em" valign="top"><b>link</b></p>

<p style="margin-left:26%; margin-top: 1em">The target of
the symbolic link when type=link.</p>

<p style="margin-top: 1em" valign="top"><b>md5</b></p>

<p style="margin-left:26%; margin-top: 1em">The MD5 message
digest of the file.</p>


<p style="margin-top: 1em" valign="top"><b>md5digest</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>md5</b>.</p>

<p style="margin-top: 1em" valign="top"><b>mode</b></p>

<p style="margin-left:26%; margin-top: 1em">The current
file&rsquo;s permissions as a numeric (octal) or symbolic
value.</p>

<p style="margin-top: 1em" valign="top"><b>nlink</b></p>

<p style="margin-left:26%; margin-top: 1em">The number of
hard links the file is expected to have.</p>


<p style="margin-top: 1em" valign="top"><b>nochange</b></p>

<p style="margin-left:26%; margin-top: 1em">Make sure this
file or directory exists but otherwise ignore all
attributes.</p>


<p style="margin-top: 1em" valign="top"><b>ripemd160digest</b></p>

<p style="margin-left:26%;">The RIPEMD160 message digest of
the file.</p>

<p style="margin-top: 1em" valign="top"><b>rmd160</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>ripemd160digest</b>.</p>


<p style="margin-top: 1em" valign="top"><b>rmd160digest</b></p>

<p style="margin-left:26%;">A synonym for
<b>ripemd160digest</b>.</p>

<p style="margin-top: 1em" valign="top"><b>sha1</b></p>

<p style="margin-left:26%; margin-top: 1em">The FIPS 160-1
(&lsquo;&lsquo;SHA-1&rsquo;&rsquo;) message digest of the
file.</p>


<p style="margin-top: 1em" valign="top"><b>sha1digest</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>sha1</b>.</p>

<p style="margin-top: 1em" valign="top"><b>sha256</b></p>

<p style="margin-left:26%; margin-top: 1em">The FIPS 180-2
(&lsquo;&lsquo;SHA-256&rsquo;&rsquo;) message digest of the
file.</p>


<p style="margin-top: 1em" valign="top"><b>sha256digest</b></p>

<p style="margin-left:26%;">A synonym for
<b>sha256</b>.</p>

<p style="margin-top: 1em" valign="top"><b>size</b></p>

<p style="margin-left:26%; margin-top: 1em">The size, in
bytes, of the file.</p>

<p style="margin-top: 1em" valign="top"><b>time</b></p>

<p style="margin-left:26%; margin-top: 1em">The last
modification time of the file.</p>

<p style="margin-top: 1em" valign="top"><b>type</b></p>

<p style="margin-left:26%; margin-top: 1em">The type of the
file; may be set to any one of the following:</p>

<p style="margin-top: 1em" valign="top"><b>block</b></p>

<p style="margin-left:45%; margin-top: 1em">block special
device</p>

<p valign="top"><b>char</b></p>

<p style="margin-left:45%; margin-top: 1em">character
special device</p>

<p valign="top"><b>dir</b></p>

<p style="margin-left:45%; margin-top: 1em">directory</p>

<p valign="top"><b>fifo</b></p>

<p style="margin-left:45%; margin-top: 1em">fifo</p>

<p valign="top"><b>file</b></p>

<p style="margin-left:45%; margin-top: 1em">regular
file</p>

<p valign="top"><b>link</b></p>

<p style="margin-left:45%; margin-top: 1em">symbolic
link</p>

<p valign="top"><b>socket</b></p>

<p style="margin-left:45%; margin-top: 1em">socket</p>

<p style="margin-top: 1em" valign="top"><b>uid</b></p>

<p style="margin-left:26%; margin-top: 1em">The file owner
as a numeric value.</p>

<p style="margin-top: 1em" valign="top"><b>uname</b></p>

<p style="margin-left:26%; margin-top: 1em">The file owner
as a symbolic name.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">cksum(1), find(1), mtree(8)</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The FreeBSD implementation of
mtree does not currently support the <b>mtree</b> 2.0
format. The requirement for a
&lsquo;&lsquo;#mtree&rsquo;&rsquo; signature line is new and
not yet widely implemented.</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>mtree</b> utility
appeared in 4.3BSD&minus;Reno. The MD5 digest capability was
added in FreeBSD&nbsp;2.1, in response to the widespread use
of programs which can spoof cksum(1). The SHA-1 and
RIPEMD160 digests were added in FreeBSD&nbsp;4.0, as new
attacks have demonstrated weaknesses in MD5. The SHA-256
digest was added in FreeBSD&nbsp;6.0. Support for file flags
was added in FreeBSD&nbsp;4.0, and mostly comes from NetBSD.
The &lsquo;&lsquo;full&rsquo;&rsquo; entry format was added
by NetBSD.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;9.0
August&nbsp;20, 2007 FreeBSD&nbsp;9.0</p>
<hr>
</body>
</html>