MTREE(5) | File Formats Manual | MTREE(5) |
mtree
— format of
mtree dir hierarchy files
The mtree
format is a textual format that
describes a collection of filesystem objects. Such files are typically used
to create or verify directory hierarchies.
An mtree
file consists of a series of
lines, each providing information about a single filesystem object. Leading
whitespace is always ignored.
When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be encoded as 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.
Each line is interpreted independently as one of the following types:
#
are ignored./
are special commands that
influence the interpretation of later lines./
characters, it is the name of a file in the current directory. Any
relative entry that describes a directory changes the current
directory./
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.Some tools that process mtree
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.
Two special commands are currently defined:
/set
/unset
/set
command. It is followed on the same line by
one or more keywords separated by whitespace.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 '=' sign and a value. Software programs reading mtree files should warn about unrecognized keywords.
Currently supported keywords are as follows:
cksum
device
The following values for format are recognized: native, 386bsd, 4bsd, bsdos, freebsd, hpux, isc, linux, netbsd, osf1, sco, solaris, sunos, svr3, svr4, and ultrix.
See mknod(8) for more details.
contents
flags
gid
gname
ignore
inode
link
md5
md5digest
md5
.mode
nlink
nochange
optional
resdevice
device
.ripemd160digest
rmd160
ripemd160digest
.rmd160digest
ripemd160digest
.sha1
sha1digest
sha1
.sha256
sha256digest
sha256
.sha384
sha384digest
sha384
.sha512
sha512digest
sha512
.size
time
type
uid
uname
The mtree
utility appeared in
4.3BSD-Reno. The MD5 digest capability was added in
FreeBSD 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
4.0, as new attacks have demonstrated weaknesses in MD5. The SHA-256
digest was added in FreeBSD 6.0. Support for file
flags was added in FreeBSD 4.0, and mostly comes
from NetBSD. The “full” entry format
was added by NetBSD.
September 4, 2013 | macOS 15.2 |