|
Packit |
08bd4c |
MTREE(5) manual page
|
|
Packit |
08bd4c |
== NAME ==
|
|
Packit |
08bd4c |
'''mtree'''
|
|
Packit |
08bd4c |
- format of mtree dir hierarchy files
|
|
Packit |
08bd4c |
== DESCRIPTION ==
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''mtree'''
|
|
Packit |
08bd4c |
format is a textual format that describes a collection of filesystem objects.
|
|
Packit |
08bd4c |
Such files are typically used to create or verify directory hierarchies.
|
|
Packit |
08bd4c |
=== General Format===
|
|
Packit |
08bd4c |
An
|
|
Packit |
08bd4c |
'''mtree'''
|
|
Packit |
08bd4c |
file consists of a series of lines, each providing information
|
|
Packit |
08bd4c |
about a single filesystem object.
|
|
Packit |
08bd4c |
Leading whitespace is always ignored.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
When encoding file or pathnames, any backslash character or
|
|
Packit |
08bd4c |
character outside of the 95 printable ASCII characters must be
|
|
Packit |
08bd4c |
encoded as a backslash followed by three
|
|
Packit |
08bd4c |
octal digits.
|
|
Packit |
08bd4c |
When reading mtree files, any appearance of a backslash
|
|
Packit |
08bd4c |
followed by three octal digits should be converted into the
|
|
Packit |
08bd4c |
corresponding character.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
Each line is interpreted independently as one of the following types:
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
Blank
|
|
Packit |
08bd4c |
Blank lines are ignored.
|
|
Packit |
08bd4c |
Comment
|
|
Packit |
08bd4c |
Lines beginning with
|
|
Packit |
08bd4c |
'''#'''
|
|
Packit |
08bd4c |
are ignored.
|
|
Packit |
08bd4c |
Special
|
|
Packit |
08bd4c |
Lines beginning with
|
|
Packit |
08bd4c |
'''/'''
|
|
Packit |
08bd4c |
are special commands that influence
|
|
Packit |
08bd4c |
the interpretation of later lines.
|
|
Packit |
08bd4c |
Relative
|
|
Packit |
08bd4c |
If the first whitespace-delimited word has no
|
|
Packit |
08bd4c |
'''/'''
|
|
Packit |
08bd4c |
characters,
|
|
Packit |
08bd4c |
it is the name of a file in the current directory.
|
|
Packit |
08bd4c |
Any relative entry that describes a directory changes the
|
|
Packit |
08bd4c |
current directory.
|
|
Packit |
08bd4c |
dot-dot
|
|
Packit |
08bd4c |
As a special case, a relative entry with the filename
|
|
Packit |
08bd4c |
''..''
|
|
Packit |
08bd4c |
changes the current directory to the parent directory.
|
|
Packit |
08bd4c |
Options on dot-dot entries are always ignored.
|
|
Packit |
08bd4c |
Full
|
|
Packit |
08bd4c |
If the first whitespace-delimited word has a
|
|
Packit |
08bd4c |
'''/'''
|
|
Packit |
08bd4c |
character after
|
|
Packit |
08bd4c |
the first character, it is the pathname of a file relative to the
|
|
Packit |
08bd4c |
starting directory.
|
|
Packit |
08bd4c |
There can be multiple full entries describing the same file.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
Some tools that process
|
|
Packit |
08bd4c |
'''mtree'''
|
|
Packit |
08bd4c |
files may require that multiple lines describing the same file
|
|
Packit |
08bd4c |
occur consecutively.
|
|
Packit |
08bd4c |
It is not permitted for the same file to be mentioned using
|
|
Packit |
08bd4c |
both a relative and a full file specification.
|
|
Packit |
08bd4c |
=== Special commands===
|
|
Packit |
08bd4c |
Two special commands are currently defined:
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
'''/set'''
|
|
Packit |
08bd4c |
This command defines default values for one or more keywords.
|
|
Packit |
08bd4c |
It is followed on the same line by one or more whitespace-separated
|
|
Packit |
08bd4c |
keyword definitions.
|
|
Packit |
08bd4c |
These definitions apply to all following files that do not specify
|
|
Packit |
08bd4c |
a value for that keyword.
|
|
Packit |
08bd4c |
'''/unset'''
|
|
Packit |
08bd4c |
This command removes any default value set by a previous
|
|
Packit |
08bd4c |
'''/set'''
|
|
Packit |
08bd4c |
command.
|
|
Packit |
08bd4c |
It is followed on the same line by one or more keywords
|
|
Packit |
08bd4c |
separated by whitespace.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
=== Keywords===
|
|
Packit |
08bd4c |
After the filename, a full or relative entry consists of zero
|
|
Packit |
08bd4c |
or more whitespace-separated keyword definitions.
|
|
Packit |
08bd4c |
Each such definition consists of a key from the following
|
|
Packit |
08bd4c |
list immediately followed by an '=' sign
|
|
Packit |
08bd4c |
and a value.
|
|
Packit |
08bd4c |
Software programs reading mtree files should warn about
|
|
Packit |
08bd4c |
unrecognized keywords.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
Currently supported keywords are as follows:
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
'''cksum'''
|
|
Packit |
08bd4c |
The checksum of the file using the default algorithm specified by
|
|
Packit |
08bd4c |
the
|
|
Packit |
08bd4c |
[[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]]
|
|
Packit |
08bd4c |
utility.
|
|
Packit |
08bd4c |
'''device'''
|
|
Packit |
08bd4c |
The device number for
|
|
Packit |
08bd4c |
.B block
|
|
Packit |
08bd4c |
or
|
|
Packit |
08bd4c |
.B char
|
|
Packit |
08bd4c |
file types.
|
|
Packit |
08bd4c |
The value must be one of the following forms:
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
''format'',''major'',''minor''Bo,''subunit'' Bc
|
|
Packit |
08bd4c |
A device with
|
|
Packit |
08bd4c |
''major'', minor
|
|
Packit |
08bd4c |
and optional
|
|
Packit |
08bd4c |
''subunit''
|
|
Packit |
08bd4c |
fields.
|
|
Packit |
08bd4c |
Their meaning is specified by the operating's system
|
|
Packit |
08bd4c |
''format''.
|
|
Packit |
08bd4c |
See below for valid formats.
|
|
Packit |
08bd4c |
''number''
|
|
Packit |
08bd4c |
Opaque number (as stored on the file system).
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
The following values for
|
|
Packit |
08bd4c |
''format''
|
|
Packit |
08bd4c |
are recognized:
|
|
Packit |
08bd4c |
.B native ,
|
|
Packit |
08bd4c |
.B 386bsd ,
|
|
Packit |
08bd4c |
.B 4bsd ,
|
|
Packit |
08bd4c |
.B bsdos ,
|
|
Packit |
08bd4c |
.B freebsd ,
|
|
Packit |
08bd4c |
.B hpux ,
|
|
Packit |
08bd4c |
.B isc ,
|
|
Packit |
08bd4c |
.B linux ,
|
|
Packit |
08bd4c |
.B netbsd ,
|
|
Packit |
08bd4c |
.B osf1 ,
|
|
Packit |
08bd4c |
.B sco ,
|
|
Packit |
08bd4c |
.B solaris ,
|
|
Packit |
08bd4c |
.B sunos ,
|
|
Packit |
08bd4c |
.B svr3 ,
|
|
Packit |
08bd4c |
.B svr4 ,
|
|
Packit |
08bd4c |
and
|
|
Packit |
08bd4c |
.B ultrix .
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
See
|
|
Packit |
08bd4c |
[[mknod(8)|http://www.freebsd.org/cgi/man.cgi?query=mknod&sektion=8]]
|
|
Packit |
08bd4c |
for more details.
|
|
Packit |
08bd4c |
'''contents'''
|
|
Packit |
08bd4c |
The full pathname of a file that holds the contents of this file.
|
|
Packit |
08bd4c |
'''flags'''
|
|
Packit |
08bd4c |
The file flags as a symbolic name.
|
|
Packit |
08bd4c |
See
|
|
Packit |
08bd4c |
[[chflags(1)|http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1]]
|
|
Packit |
08bd4c |
for information on these names.
|
|
Packit |
08bd4c |
If no flags are to be set the string
|
|
Packit |
08bd4c |
"none"
|
|
Packit |
08bd4c |
may be used to override the current default.
|
|
Packit |
08bd4c |
'''gid'''
|
|
Packit |
08bd4c |
The file group as a numeric value.
|
|
Packit |
08bd4c |
'''gname'''
|
|
Packit |
08bd4c |
The file group as a symbolic name.
|
|
Packit |
08bd4c |
'''ignore'''
|
|
Packit |
08bd4c |
Ignore any file hierarchy below this file.
|
|
Packit |
08bd4c |
'''inode'''
|
|
Packit |
08bd4c |
The inode number.
|
|
Packit |
08bd4c |
'''link'''
|
|
Packit |
08bd4c |
The target of the symbolic link when type=link.
|
|
Packit |
08bd4c |
'''md5'''
|
|
Packit |
08bd4c |
The MD5 message digest of the file.
|
|
Packit |
08bd4c |
'''md5digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''md5'''.
|
|
Packit |
08bd4c |
'''mode'''
|
|
Packit |
08bd4c |
The current file's permissions as a numeric (octal) or symbolic
|
|
Packit |
08bd4c |
value.
|
|
Packit |
08bd4c |
'''nlink'''
|
|
Packit |
08bd4c |
The number of hard links the file is expected to have.
|
|
Packit |
08bd4c |
'''nochange'''
|
|
Packit |
08bd4c |
Make sure this file or directory exists but otherwise ignore all attributes.
|
|
Packit |
08bd4c |
'''optional'''
|
|
Packit |
08bd4c |
The file is optional; do not complain about the file if it is not in
|
|
Packit |
08bd4c |
the file hierarchy.
|
|
Packit |
08bd4c |
'''resdevice'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
"resident"
|
|
Packit |
08bd4c |
device number of the file, e.g. the ID of the device that
|
|
Packit |
08bd4c |
contains the file.
|
|
Packit |
08bd4c |
Its format is the same as the one for
|
|
Packit |
08bd4c |
'''device'''.
|
|
Packit |
08bd4c |
'''ripemd160digest'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''RIPEMD160'''
|
|
Packit |
08bd4c |
message digest of the file.
|
|
Packit |
08bd4c |
'''rmd160'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''ripemd160digest'''.
|
|
Packit |
08bd4c |
'''rmd160digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''ripemd160digest'''.
|
|
Packit |
08bd4c |
'''sha1'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''FIPS'''
|
|
Packit |
08bd4c |
160-1
|
|
Packit |
08bd4c |
("Tn SHA-1")
|
|
Packit |
08bd4c |
message digest of the file.
|
|
Packit |
08bd4c |
'''sha1digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''sha1'''.
|
|
Packit |
08bd4c |
'''sha256'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''FIPS'''
|
|
Packit |
08bd4c |
180-2
|
|
Packit |
08bd4c |
("Tn SHA-256")
|
|
Packit |
08bd4c |
message digest of the file.
|
|
Packit |
08bd4c |
'''sha256digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''sha256'''.
|
|
Packit |
08bd4c |
'''sha384'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''FIPS'''
|
|
Packit |
08bd4c |
180-2
|
|
Packit |
08bd4c |
("Tn SHA-384")
|
|
Packit |
08bd4c |
message digest of the file.
|
|
Packit |
08bd4c |
'''sha384digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''sha384'''.
|
|
Packit |
08bd4c |
'''sha512'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''FIPS'''
|
|
Packit |
08bd4c |
180-2
|
|
Packit |
08bd4c |
("Tn SHA-512")
|
|
Packit |
08bd4c |
message digest of the file.
|
|
Packit |
08bd4c |
'''sha512digest'''
|
|
Packit |
08bd4c |
A synonym for
|
|
Packit |
08bd4c |
'''sha512'''.
|
|
Packit |
08bd4c |
'''size'''
|
|
Packit |
08bd4c |
The size, in bytes, of the file.
|
|
Packit |
08bd4c |
'''time'''
|
|
Packit |
08bd4c |
The last modification time of the file.
|
|
Packit |
08bd4c |
'''type'''
|
|
Packit |
08bd4c |
The type of the file; may be set to any one of the following:
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
'''block'''
|
|
Packit |
08bd4c |
block special device
|
|
Packit |
08bd4c |
'''char'''
|
|
Packit |
08bd4c |
character special device
|
|
Packit |
08bd4c |
'''dir'''
|
|
Packit |
08bd4c |
directory
|
|
Packit |
08bd4c |
'''fifo'''
|
|
Packit |
08bd4c |
fifo
|
|
Packit |
08bd4c |
'''file'''
|
|
Packit |
08bd4c |
regular file
|
|
Packit |
08bd4c |
'''link'''
|
|
Packit |
08bd4c |
symbolic link
|
|
Packit |
08bd4c |
'''socket'''
|
|
Packit |
08bd4c |
socket
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
'''uid'''
|
|
Packit |
08bd4c |
The file owner as a numeric value.
|
|
Packit |
08bd4c |
'''uname'''
|
|
Packit |
08bd4c |
The file owner as a symbolic name.
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
== SEE ALSO ==
|
|
Packit |
08bd4c |
[[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]],
|
|
Packit |
08bd4c |
[[find(1)|http://www.freebsd.org/cgi/man.cgi?query=find&sektion=1]],
|
|
Packit |
08bd4c |
[[mtree(8)|http://www.freebsd.org/cgi/man.cgi?query=mtree&sektion=8]]
|
|
Packit |
08bd4c |
== BUGS ==
|
|
Packit |
08bd4c |
== HISTORY ==
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''mtree'''
|
|
Packit |
08bd4c |
utility appeared in
|
|
Packit |
08bd4c |
BSD 4.3 Reno.
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''MD5'''
|
|
Packit |
08bd4c |
digest capability was added in
|
|
Packit |
08bd4c |
FreeBSD 2.1,
|
|
Packit |
08bd4c |
in response to the widespread use of programs which can spoof
|
|
Packit |
08bd4c |
[[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]].
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''SHA-1'''
|
|
Packit |
08bd4c |
and
|
|
Packit |
08bd4c |
'''RIPEMD160'''
|
|
Packit |
08bd4c |
digests were added in
|
|
Packit |
08bd4c |
FreeBSD 4.0,
|
|
Packit |
08bd4c |
as new attacks have demonstrated weaknesses in
|
|
Packit |
08bd4c |
'''MD5 .'''
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
'''SHA-256'''
|
|
Packit |
08bd4c |
digest was added in
|
|
Packit |
08bd4c |
FreeBSD 6.0.
|
|
Packit |
08bd4c |
Support for file flags was added in
|
|
Packit |
08bd4c |
FreeBSD 4.0,
|
|
Packit |
08bd4c |
and mostly comes from
|
|
Packit |
08bd4c |
NetBSD.
|
|
Packit |
08bd4c |
The
|
|
Packit |
08bd4c |
"full"
|
|
Packit |
08bd4c |
entry format was added by
|
|
Packit |
08bd4c |
NetBSD.
|