2020-03-04 16:55:40 +01:00
|
|
|
|
MTREE(5) BSD File Formats Manual MTREE(5)
|
|
|
|
|
|
|
|
|
|
NAME
|
2021-12-09 12:22:14 +01:00
|
|
|
|
mtree — format of mtree dir hierarchy files
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
General Format
|
|
|
|
|
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
|
2021-12-09 12:22:14 +01:00
|
|
|
|
outside of the 95 printable ASCII characters must be encoded as a back‐
|
|
|
|
|
slash followed by three octal digits. When reading mtree files, any ap‐
|
|
|
|
|
pearance of a backslash followed by three octal digits should be con‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
verted into the corresponding character.
|
|
|
|
|
|
|
|
|
|
Each line is interpreted independently as one of the following types:
|
|
|
|
|
|
|
|
|
|
Blank Blank lines are ignored.
|
|
|
|
|
|
|
|
|
|
Comment Lines beginning with # are ignored.
|
|
|
|
|
|
|
|
|
|
Special Lines beginning with / are special commands that influence
|
|
|
|
|
the interpretation of later lines.
|
|
|
|
|
|
|
|
|
|
Relative If the first whitespace-delimited word has no / characters,
|
2021-12-09 12:22:14 +01:00
|
|
|
|
it is the name of a file in the current directory. Any rela‐
|
|
|
|
|
tive entry that describes a directory changes the current di‐
|
|
|
|
|
rectory.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
dot-dot As a special case, a relative entry with the filename ..
|
2021-12-09 12:22:14 +01:00
|
|
|
|
changes the current directory to the parent directory. Op‐
|
|
|
|
|
tions on dot-dot entries are always ignored.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
Full If the first whitespace-delimited word has a / character af‐
|
|
|
|
|
ter the first character, it is the pathname of a file rela‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
tive to the starting directory. There can be multiple full
|
|
|
|
|
entries describing the same file.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
Some tools that process mtree files may require that multiple lines de‐
|
|
|
|
|
scribing the same file occur consecutively. It is not permitted for the
|
|
|
|
|
same file to be mentioned using both a relative and a full file specifi‐
|
|
|
|
|
cation.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
Special commands
|
|
|
|
|
Two special commands are currently defined:
|
|
|
|
|
|
|
|
|
|
/set 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
|
2021-12-09 12:22:14 +01:00
|
|
|
|
all following files that do not specify a value for that key‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
word.
|
|
|
|
|
|
|
|
|
|
/unset This command removes any default value set by a previous /set
|
2021-12-09 12:22:14 +01:00
|
|
|
|
command. It is followed on the same line by one or more key‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
words separated by whitespace.
|
|
|
|
|
|
|
|
|
|
Keywords
|
|
|
|
|
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
|
2021-12-09 12:22:14 +01:00
|
|
|
|
a value. Software programs reading mtree files should warn about unrec‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
ognized keywords.
|
|
|
|
|
|
|
|
|
|
Currently supported keywords are as follows:
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
cksum The checksum of the file using the default algorithm speci‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
fied by the cksum(1) utility.
|
|
|
|
|
|
|
|
|
|
device The device number for block or char file types. The value
|
|
|
|
|
must be one of the following forms:
|
|
|
|
|
|
|
|
|
|
format,major,minor[,subunit]
|
|
|
|
|
A device with major, minor and optional subunit fields.
|
|
|
|
|
Their meaning is specified by the operating's system
|
|
|
|
|
format. See below for valid formats.
|
|
|
|
|
|
|
|
|
|
number
|
|
|
|
|
Opaque number (as stored on the file system).
|
|
|
|
|
|
|
|
|
|
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 The full pathname of a file that holds the contents of this
|
|
|
|
|
file.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
flags The file flags as a symbolic name. See chflags(1) for infor‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
mation on these names. If no flags are to be set the string
|
2021-12-09 12:22:14 +01:00
|
|
|
|
“none” may be used to override the current default.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
gid The file group as a numeric value.
|
|
|
|
|
|
|
|
|
|
gname The file group as a symbolic name.
|
|
|
|
|
|
|
|
|
|
ignore Ignore any file hierarchy below this file.
|
|
|
|
|
|
|
|
|
|
inode The inode number.
|
|
|
|
|
|
|
|
|
|
link The target of the symbolic link when type=link.
|
|
|
|
|
|
|
|
|
|
md5 The MD5 message digest of the file.
|
|
|
|
|
|
|
|
|
|
md5digest A synonym for md5.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
mode The current file's permissions as a numeric (octal) or sym‐
|
2020-03-04 16:55:40 +01:00
|
|
|
|
bolic value.
|
|
|
|
|
|
|
|
|
|
nlink The number of hard links the file is expected to have.
|
|
|
|
|
|
|
|
|
|
nochange Make sure this file or directory exists but otherwise ignore
|
|
|
|
|
all attributes.
|
|
|
|
|
|
|
|
|
|
optional The file is optional; do not complain about the file if it is
|
|
|
|
|
not in the file hierarchy.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
resdevice The “resident” device number of the file, e.g. the ID of the
|
|
|
|
|
device that contains the file. Its format is the same as the
|
|
|
|
|
one for device.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
ripemd160digest
|
|
|
|
|
The RIPEMD160 message digest of the file.
|
|
|
|
|
|
|
|
|
|
rmd160 A synonym for ripemd160digest.
|
|
|
|
|
|
|
|
|
|
rmd160digest
|
|
|
|
|
A synonym for ripemd160digest.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
sha1 The FIPS 160-1 (“SHA-1”) message digest of the file.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
sha1digest A synonym for sha1.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
sha256 The FIPS 180-2 (“SHA-256”) message digest of the file.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
sha256digest
|
|
|
|
|
A synonym for sha256.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
sha384 The FIPS 180-2 (“SHA-384”) message digest of the file.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
sha384digest
|
|
|
|
|
A synonym for sha384.
|
|
|
|
|
|
2021-12-09 12:22:14 +01:00
|
|
|
|
sha512 The FIPS 180-2 (“SHA-512”) message digest of the file.
|
2020-03-04 16:55:40 +01:00
|
|
|
|
|
|
|
|
|
sha512digest
|
|
|
|
|
A synonym for sha512.
|
|
|
|
|
|
|
|
|
|
size The size, in bytes, of the file.
|
|
|
|
|
|
|
|
|
|
time The last modification time of the file.
|
|
|
|
|
|
|
|
|
|
type The type of the file; may be set to any one of the following:
|
|
|
|
|
|
|
|
|
|
block block special device
|
|
|
|
|
char character special device
|
|
|
|
|
dir directory
|
|
|
|
|
fifo fifo
|
|
|
|
|
file regular file
|
|
|
|
|
link symbolic link
|
|
|
|
|
socket socket
|
|
|
|
|
|
|
|
|
|
uid The file owner as a numeric value.
|
|
|
|
|
|
|
|
|
|
uname The file owner as a symbolic name.
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
|
cksum(1), find(1), mtree(8)
|
|
|
|
|
|
|
|
|
|
HISTORY
|
|
|
|
|
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
|
2021-12-09 12:22:14 +01:00
|
|
|
|
added in FreeBSD 4.0, and mostly comes from NetBSD. The “full” entry
|
2020-03-04 16:55:40 +01:00
|
|
|
|
format was added by NetBSD.
|
|
|
|
|
|
|
|
|
|
BSD September 4, 2013 BSD
|