|
Packit Service |
1d0348 |
.\" Copyright (c) 1989, 1990, 1993
|
|
Packit Service |
1d0348 |
.\" The Regents of the University of California. All rights reserved.
|
|
Packit Service |
1d0348 |
.\"
|
|
Packit Service |
1d0348 |
.\" Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
1d0348 |
.\" modification, are permitted provided that the following conditions
|
|
Packit Service |
1d0348 |
.\" are met:
|
|
Packit Service |
1d0348 |
.\" 1. Redistributions of source code must retain the above copyright
|
|
Packit Service |
1d0348 |
.\" notice, this list of conditions and the following disclaimer.
|
|
Packit Service |
1d0348 |
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
Packit Service |
1d0348 |
.\" notice, this list of conditions and the following disclaimer in the
|
|
Packit Service |
1d0348 |
.\" documentation and/or other materials provided with the distribution.
|
|
Packit Service |
1d0348 |
.\" 4. Neither the name of the University nor the names of its contributors
|
|
Packit Service |
1d0348 |
.\" may be used to endorse or promote products derived from this software
|
|
Packit Service |
1d0348 |
.\" without specific prior written permission.
|
|
Packit Service |
1d0348 |
.\"
|
|
Packit Service |
1d0348 |
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
Packit Service |
1d0348 |
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit Service |
1d0348 |
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
Packit Service |
1d0348 |
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
Packit Service |
1d0348 |
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit Service |
1d0348 |
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
Packit Service |
1d0348 |
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
Packit Service |
1d0348 |
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
Packit Service |
1d0348 |
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
Packit Service |
1d0348 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
Packit Service |
1d0348 |
.\" SUCH DAMAGE.
|
|
Packit Service |
1d0348 |
.\"
|
|
Packit Service |
1d0348 |
.\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93
|
|
Packit Service |
1d0348 |
.\" $FreeBSD$
|
|
Packit Service |
1d0348 |
.\"
|
|
Packit Service |
1d0348 |
.Dd September 4, 2013
|
|
Packit Service |
1d0348 |
.Dt MTREE 5
|
|
Packit Service |
1d0348 |
.Os
|
|
Packit Service |
1d0348 |
.Sh NAME
|
|
Packit Service |
1d0348 |
.Nm mtree
|
|
Packit Service |
1d0348 |
.Nd format of mtree dir hierarchy files
|
|
Packit Service |
1d0348 |
.Sh DESCRIPTION
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Nm
|
|
Packit Service |
1d0348 |
format is a textual format that describes a collection of filesystem objects.
|
|
Packit Service |
1d0348 |
Such files are typically used to create or verify directory hierarchies.
|
|
Packit Service |
1d0348 |
.Ss General Format
|
|
Packit Service |
1d0348 |
An
|
|
Packit Service |
1d0348 |
.Nm
|
|
Packit Service |
1d0348 |
file consists of a series of lines, each providing information
|
|
Packit Service |
1d0348 |
about a single filesystem object.
|
|
Packit Service |
1d0348 |
Leading whitespace is always ignored.
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
When encoding file or pathnames, any backslash character or
|
|
Packit Service |
1d0348 |
character outside of the 95 printable ASCII characters must be
|
|
Packit Service |
1d0348 |
encoded as a backslash followed by three
|
|
Packit Service |
1d0348 |
octal digits.
|
|
Packit Service |
1d0348 |
When reading mtree files, any appearance of a backslash
|
|
Packit Service |
1d0348 |
followed by three octal digits should be converted into the
|
|
Packit Service |
1d0348 |
corresponding character.
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
Each line is interpreted independently as one of the following types:
|
|
Packit Service |
1d0348 |
.Bl -tag -width Cm
|
|
Packit Service |
1d0348 |
.It Blank
|
|
Packit Service |
1d0348 |
Blank lines are ignored.
|
|
Packit Service |
1d0348 |
.It Comment
|
|
Packit Service |
1d0348 |
Lines beginning with
|
|
Packit Service |
1d0348 |
.Cm #
|
|
Packit Service |
1d0348 |
are ignored.
|
|
Packit Service |
1d0348 |
.It Special
|
|
Packit Service |
1d0348 |
Lines beginning with
|
|
Packit Service |
1d0348 |
.Cm /
|
|
Packit Service |
1d0348 |
are special commands that influence
|
|
Packit Service |
1d0348 |
the interpretation of later lines.
|
|
Packit Service |
1d0348 |
.It Relative
|
|
Packit Service |
1d0348 |
If the first whitespace-delimited word has no
|
|
Packit Service |
1d0348 |
.Cm /
|
|
Packit Service |
1d0348 |
characters,
|
|
Packit Service |
1d0348 |
it is the name of a file in the current directory.
|
|
Packit Service |
1d0348 |
Any relative entry that describes a directory changes the
|
|
Packit Service |
1d0348 |
current directory.
|
|
Packit Service |
1d0348 |
.It dot-dot
|
|
Packit Service |
1d0348 |
As a special case, a relative entry with the filename
|
|
Packit Service |
1d0348 |
.Pa ..
|
|
Packit Service |
1d0348 |
changes the current directory to the parent directory.
|
|
Packit Service |
1d0348 |
Options on dot-dot entries are always ignored.
|
|
Packit Service |
1d0348 |
.It Full
|
|
Packit Service |
1d0348 |
If the first whitespace-delimited word has a
|
|
Packit Service |
1d0348 |
.Cm /
|
|
Packit Service |
1d0348 |
character after
|
|
Packit Service |
1d0348 |
the first character, it is the pathname of a file relative to the
|
|
Packit Service |
1d0348 |
starting directory.
|
|
Packit Service |
1d0348 |
There can be multiple full entries describing the same file.
|
|
Packit Service |
1d0348 |
.El
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
Some tools that process
|
|
Packit Service |
1d0348 |
.Nm
|
|
Packit Service |
1d0348 |
files may require that multiple lines describing the same file
|
|
Packit Service |
1d0348 |
occur consecutively.
|
|
Packit Service |
1d0348 |
It is not permitted for the same file to be mentioned using
|
|
Packit Service |
1d0348 |
both a relative and a full file specification.
|
|
Packit Service |
1d0348 |
.Ss Special commands
|
|
Packit Service |
1d0348 |
Two special commands are currently defined:
|
|
Packit Service |
1d0348 |
.Bl -tag -width Cm
|
|
Packit Service |
1d0348 |
.It Cm /set
|
|
Packit Service |
1d0348 |
This command defines default values for one or more keywords.
|
|
Packit Service |
1d0348 |
It is followed on the same line by one or more whitespace-separated
|
|
Packit Service |
1d0348 |
keyword definitions.
|
|
Packit Service |
1d0348 |
These definitions apply to all following files that do not specify
|
|
Packit Service |
1d0348 |
a value for that keyword.
|
|
Packit Service |
1d0348 |
.It Cm /unset
|
|
Packit Service |
1d0348 |
This command removes any default value set by a previous
|
|
Packit Service |
1d0348 |
.Cm /set
|
|
Packit Service |
1d0348 |
command.
|
|
Packit Service |
1d0348 |
It is followed on the same line by one or more keywords
|
|
Packit Service |
1d0348 |
separated by whitespace.
|
|
Packit Service |
1d0348 |
.El
|
|
Packit Service |
1d0348 |
.Ss Keywords
|
|
Packit Service |
1d0348 |
After the filename, a full or relative entry consists of zero
|
|
Packit Service |
1d0348 |
or more whitespace-separated keyword definitions.
|
|
Packit Service |
1d0348 |
Each such definition consists of a key from the following
|
|
Packit Service |
1d0348 |
list immediately followed by an '=' sign
|
|
Packit Service |
1d0348 |
and a value.
|
|
Packit Service |
1d0348 |
Software programs reading mtree files should warn about
|
|
Packit Service |
1d0348 |
unrecognized keywords.
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
Currently supported keywords are as follows:
|
|
Packit Service |
1d0348 |
.Bl -tag -width Cm
|
|
Packit Service |
1d0348 |
.It Cm cksum
|
|
Packit Service |
1d0348 |
The checksum of the file using the default algorithm specified by
|
|
Packit Service |
1d0348 |
the
|
|
Packit Service |
1d0348 |
.Xr cksum 1
|
|
Packit Service |
1d0348 |
utility.
|
|
Packit Service |
1d0348 |
.It Cm device
|
|
Packit Service |
1d0348 |
The device number for
|
|
Packit Service |
1d0348 |
.Sy block
|
|
Packit Service |
1d0348 |
or
|
|
Packit Service |
1d0348 |
.Sy char
|
|
Packit Service |
1d0348 |
file types.
|
|
Packit Service |
1d0348 |
The value must be one of the following forms:
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
.Bl -tag -width 4n
|
|
Packit Service |
1d0348 |
.It Ar format , Ns Ar major , Ns Ar minor Ns Bo , Ns Ar subunit Bc
|
|
Packit Service |
1d0348 |
A device with
|
|
Packit Service |
1d0348 |
.Ar major , minor
|
|
Packit Service |
1d0348 |
and optional
|
|
Packit Service |
1d0348 |
.Ar subunit
|
|
Packit Service |
1d0348 |
fields.
|
|
Packit Service |
1d0348 |
Their meaning is specified by the operating's system
|
|
Packit Service |
1d0348 |
.Ar format .
|
|
Packit Service |
1d0348 |
See below for valid formats.
|
|
Packit Service |
1d0348 |
.It Ar number
|
|
Packit Service |
1d0348 |
Opaque number (as stored on the file system).
|
|
Packit Service |
1d0348 |
.El
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
The following values for
|
|
Packit Service |
1d0348 |
.Ar format
|
|
Packit Service |
1d0348 |
are recognized:
|
|
Packit Service |
1d0348 |
.Sy native ,
|
|
Packit Service |
1d0348 |
.Sy 386bsd ,
|
|
Packit Service |
1d0348 |
.Sy 4bsd ,
|
|
Packit Service |
1d0348 |
.Sy bsdos ,
|
|
Packit Service |
1d0348 |
.Sy freebsd ,
|
|
Packit Service |
1d0348 |
.Sy hpux ,
|
|
Packit Service |
1d0348 |
.Sy isc ,
|
|
Packit Service |
1d0348 |
.Sy linux ,
|
|
Packit Service |
1d0348 |
.Sy netbsd ,
|
|
Packit Service |
1d0348 |
.Sy osf1 ,
|
|
Packit Service |
1d0348 |
.Sy sco ,
|
|
Packit Service |
1d0348 |
.Sy solaris ,
|
|
Packit Service |
1d0348 |
.Sy sunos ,
|
|
Packit Service |
1d0348 |
.Sy svr3 ,
|
|
Packit Service |
1d0348 |
.Sy svr4 ,
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
.Sy ultrix .
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
See
|
|
Packit Service |
1d0348 |
.Xr mknod 8
|
|
Packit Service |
1d0348 |
for more details.
|
|
Packit Service |
1d0348 |
.It Cm contents
|
|
Packit Service |
1d0348 |
The full pathname of a file that holds the contents of this file.
|
|
Packit Service |
1d0348 |
.It Cm flags
|
|
Packit Service |
1d0348 |
The file flags as a symbolic name.
|
|
Packit Service |
1d0348 |
See
|
|
Packit Service |
1d0348 |
.Xr chflags 1
|
|
Packit Service |
1d0348 |
for information on these names.
|
|
Packit Service |
1d0348 |
If no flags are to be set the string
|
|
Packit Service |
1d0348 |
.Dq none
|
|
Packit Service |
1d0348 |
may be used to override the current default.
|
|
Packit Service |
1d0348 |
.It Cm gid
|
|
Packit Service |
1d0348 |
The file group as a numeric value.
|
|
Packit Service |
1d0348 |
.It Cm gname
|
|
Packit Service |
1d0348 |
The file group as a symbolic name.
|
|
Packit Service |
1d0348 |
.It Cm ignore
|
|
Packit Service |
1d0348 |
Ignore any file hierarchy below this file.
|
|
Packit Service |
1d0348 |
.It Cm inode
|
|
Packit Service |
1d0348 |
The inode number.
|
|
Packit Service |
1d0348 |
.It Cm link
|
|
Packit Service |
1d0348 |
The target of the symbolic link when type=link.
|
|
Packit Service |
1d0348 |
.It Cm md5
|
|
Packit Service |
1d0348 |
The MD5 message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm md5digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm md5 .
|
|
Packit Service |
1d0348 |
.It Cm mode
|
|
Packit Service |
1d0348 |
The current file's permissions as a numeric (octal) or symbolic
|
|
Packit Service |
1d0348 |
value.
|
|
Packit Service |
1d0348 |
.It Cm nlink
|
|
Packit Service |
1d0348 |
The number of hard links the file is expected to have.
|
|
Packit Service |
1d0348 |
.It Cm nochange
|
|
Packit Service |
1d0348 |
Make sure this file or directory exists but otherwise ignore all attributes.
|
|
Packit Service |
1d0348 |
.It Cm optional
|
|
Packit Service |
1d0348 |
The file is optional; do not complain about the file if it is not in
|
|
Packit Service |
1d0348 |
the file hierarchy.
|
|
Packit Service |
1d0348 |
.It Cm resdevice
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Dq resident
|
|
Packit Service |
1d0348 |
device number of the file, e.g. the ID of the device that
|
|
Packit Service |
1d0348 |
contains the file.
|
|
Packit Service |
1d0348 |
Its format is the same as the one for
|
|
Packit Service |
1d0348 |
.Cm device .
|
|
Packit Service |
1d0348 |
.It Cm ripemd160digest
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn RIPEMD160
|
|
Packit Service |
1d0348 |
message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm rmd160
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm ripemd160digest .
|
|
Packit Service |
1d0348 |
.It Cm rmd160digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm ripemd160digest .
|
|
Packit Service |
1d0348 |
.It Cm sha1
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn FIPS
|
|
Packit Service |
1d0348 |
160-1
|
|
Packit Service |
1d0348 |
.Pq Dq Tn SHA-1
|
|
Packit Service |
1d0348 |
message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm sha1digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm sha1 .
|
|
Packit Service |
1d0348 |
.It Cm sha256
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn FIPS
|
|
Packit Service |
1d0348 |
180-2
|
|
Packit Service |
1d0348 |
.Pq Dq Tn SHA-256
|
|
Packit Service |
1d0348 |
message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm sha256digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm sha256 .
|
|
Packit Service |
1d0348 |
.It Cm sha384
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn FIPS
|
|
Packit Service |
1d0348 |
180-2
|
|
Packit Service |
1d0348 |
.Pq Dq Tn SHA-384
|
|
Packit Service |
1d0348 |
message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm sha384digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm sha384 .
|
|
Packit Service |
1d0348 |
.It Cm sha512
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn FIPS
|
|
Packit Service |
1d0348 |
180-2
|
|
Packit Service |
1d0348 |
.Pq Dq Tn SHA-512
|
|
Packit Service |
1d0348 |
message digest of the file.
|
|
Packit Service |
1d0348 |
.It Cm sha512digest
|
|
Packit Service |
1d0348 |
A synonym for
|
|
Packit Service |
1d0348 |
.Cm sha512 .
|
|
Packit Service |
1d0348 |
.It Cm size
|
|
Packit Service |
1d0348 |
The size, in bytes, of the file.
|
|
Packit Service |
1d0348 |
.It Cm time
|
|
Packit Service |
1d0348 |
The last modification time of the file.
|
|
Packit Service |
1d0348 |
.It Cm type
|
|
Packit Service |
1d0348 |
The type of the file; may be set to any one of the following:
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
.Bl -tag -width Cm -compact
|
|
Packit Service |
1d0348 |
.It Cm block
|
|
Packit Service |
1d0348 |
block special device
|
|
Packit Service |
1d0348 |
.It Cm char
|
|
Packit Service |
1d0348 |
character special device
|
|
Packit Service |
1d0348 |
.It Cm dir
|
|
Packit Service |
1d0348 |
directory
|
|
Packit Service |
1d0348 |
.It Cm fifo
|
|
Packit Service |
1d0348 |
fifo
|
|
Packit Service |
1d0348 |
.It Cm file
|
|
Packit Service |
1d0348 |
regular file
|
|
Packit Service |
1d0348 |
.It Cm link
|
|
Packit Service |
1d0348 |
symbolic link
|
|
Packit Service |
1d0348 |
.It Cm socket
|
|
Packit Service |
1d0348 |
socket
|
|
Packit Service |
1d0348 |
.El
|
|
Packit Service |
1d0348 |
.It Cm uid
|
|
Packit Service |
1d0348 |
The file owner as a numeric value.
|
|
Packit Service |
1d0348 |
.It Cm uname
|
|
Packit Service |
1d0348 |
The file owner as a symbolic name.
|
|
Packit Service |
1d0348 |
.El
|
|
Packit Service |
1d0348 |
.Pp
|
|
Packit Service |
1d0348 |
.Sh SEE ALSO
|
|
Packit Service |
1d0348 |
.Xr cksum 1 ,
|
|
Packit Service |
1d0348 |
.Xr find 1 ,
|
|
Packit Service |
1d0348 |
.Xr mtree 8
|
|
Packit Service |
1d0348 |
.Sh BUGS
|
|
Packit Service |
1d0348 |
.Sh HISTORY
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Nm
|
|
Packit Service |
1d0348 |
utility appeared in
|
|
Packit Service |
1d0348 |
.Bx 4.3 Reno .
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn MD5
|
|
Packit Service |
1d0348 |
digest capability was added in
|
|
Packit Service |
1d0348 |
.Fx 2.1 ,
|
|
Packit Service |
1d0348 |
in response to the widespread use of programs which can spoof
|
|
Packit Service |
1d0348 |
.Xr cksum 1 .
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn SHA-1
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
.Tn RIPEMD160
|
|
Packit Service |
1d0348 |
digests were added in
|
|
Packit Service |
1d0348 |
.Fx 4.0 ,
|
|
Packit Service |
1d0348 |
as new attacks have demonstrated weaknesses in
|
|
Packit Service |
1d0348 |
.Tn MD5 .
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Tn SHA-256
|
|
Packit Service |
1d0348 |
digest was added in
|
|
Packit Service |
1d0348 |
.Fx 6.0 .
|
|
Packit Service |
1d0348 |
Support for file flags was added in
|
|
Packit Service |
1d0348 |
.Fx 4.0 ,
|
|
Packit Service |
1d0348 |
and mostly comes from
|
|
Packit Service |
1d0348 |
.Nx .
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
.Dq full
|
|
Packit Service |
1d0348 |
entry format was added by
|
|
Packit Service |
1d0348 |
.Nx .
|