| Main index | Section 5 | Options |
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:
| Signature | |
| The first line of any mtree file must begin with "#mtree". If a file contains any full path entries, the first line should begin with "#mtree v2.0", otherwise, the first line should begin with "#mtree v1.0". | |
| 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, it is the name of a file in the current directory. Any relative entry that describes a directory changes the current directory. | |
| dot-dot | |
| As a special case, a relative entry with the filename .. changes the current directory to the parent directory. Options on dot-dot entries are always ignored. | |
| Full | If the first whitespace-delimited word has a / 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.
| /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 all following files that do not specify a value for that keyword. |
| /unset | |
| This command removes any default value set by a previous /set command. It is followed on the same line by one or more keywords separated by whitespace. | |
Currently supported keywords are as follows:
| cksum | The checksum of the file using the default algorithm specified by the cksum(1) utility. |
| contents | |
| The full pathname of a file whose contents should be compared to the contents of this file. | |
| flags | The file flags as a symbolic name. See chflags(1) for information on these names. If no flags are to be set the string "none" may be used to override the current default. |
| ignore | |
| Ignore any file hierarchy below this file. | |
| gid | The file group as a numeric value. |
| gname | The file group as a symbolic name. |
| md5 | The MD5 message digest of the file. |
| md5digest | |
| A synonym for md5. | |
| sha1 | The FIPS 160-1 (" SHA-1") message digest of the file. |
| sha1digest | |
| A synonym for sha1. | |
| sha256 | |
| The FIPS 180-2 (" SHA-256") message digest of the file. | |
| sha256digest | |
| A synonym for sha256. | |
| ripemd160digest | |
| The RIPEMD160 message digest of the file. | |
| rmd160 | |
| A synonym for ripemd160digest. | |
| rmd160digest | |
| A synonym for ripemd160digest. | |
| mode | The current file's permissions as a numeric (octal) or symbolic 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. | |
| uid | The file owner as a numeric value. |
| uname | The file owner as a symbolic name. |
| size | The size, in bytes, of the file. |
| link | The file the symbolic link is expected to reference. |
| time | The last modification time of the file, in seconds and nanoseconds. The value should include a period character and exactly nine digits after the period. |
| 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 | |
| MTREE (5) | December 31, 2007 |
| Main index | Section 5 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Not only is UNIX dead, it's starting to smell really bad. | ” |
| — Rob Pike | ||