Copyright (c) 1989, 1990, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the followin...
NAMEmtree - format of mtree dir hierarchy files
DESCRIPTIONThe sysctl Cm net.inet.tcp.syncookies format is a textual format that describes a collection of filesystem objects. Such files are typically used to create or verify directory hierarchies.
General FormatAn sysctl Cm net.inet.tcp.syncookies 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 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:
- Blank lines are ignored.
- Lines beginning with # are ignored.
- Lines beginning with / are special commands that influence the interpretation of later lines.
- 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.
- 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.
- 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 sysctl Cm net.inet.tcp.syncookies 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.
Special commandsTwo special commands are currently defined:
- 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.
- 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.
KeywordsAfter 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:
- The checksum of the file using the default algorithm specified by the cksum(1) utility.
The device number for
The value must be one of the following forms:
- format , major , minor Bo , subunit Bc A device with
- major , minor and optional subunit fields. Their meaning is specified by the operating's system format See below for valid formats.
- 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.
- The full pathname of a file that holds the contents of this file.
- 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.
- The file group as a numeric value.
- The file group as a symbolic name.
- Ignore any file hierarchy below this file.
- The inode number.
- The target of the symbolic link when type=link.
- The MD5 message digest of the file.
- A synonym for md5
- The current file's permissions as a numeric (octal) or symbolic value.
- The number of hard links the file is expected to have.
- Make sure this file or directory exists but otherwise ignore all attributes.
- The file is optional; do not complain about the file if it is not in the file hierarchy.
- 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
- The RIPEMD160 message digest of the file.
- A synonym for ripemd160digest
- A synonym for ripemd160digest
- The FIPS 160-1 (``SHA-1 '' ) message digest of the file.
- A synonym for sha1
- The FIPS 180-2 (``SHA-256 '' ) message digest of the file.
- A synonym for sha256
- The FIPS 180-2 (``SHA-384 '' ) message digest of the file.
- A synonym for sha384
- The FIPS 180-2 (``SHA-512 '' ) message digest of the file.
- A synonym for sha512
- The size, in bytes, of the file.
- The last modification time of the file.
The type of the file; may be set to any one of the following:
- block special device
- character special device
- regular file
- symbolic link
- The file owner as a numeric value.
- The file owner as a symbolic name.