[manual index][section index]

NAME

proto - file system prototype

DESCRIPTION

A proto file defines a file system hierarchy, for programs that create, copy or operate on them, such as fs(1) or mkfs(8). The proto file defines the hierarchy as a set of names relative to an existing hierarchy, for instance in an existing file system or a list of path names in an archive. Files in the existing hierarchy that are not specified in the proto file are ignored. Fsproto(2) provides functions to read a prototype file and enumerate the names it selects in an existing hierarchy.

Each line of the proto file specifies a file (where the term `file' includes directories). Indentation is significant, with each level of indentation corresponding to a level in the file tree. Each line contains up to five fields separated by white space:

name perm uid gid source

Name is the last path element in the resulting file tree. Perm specifies the permissions, as described below. Uid is the owner of the file, and gid is the group owning the file. Source is the name of a file in the current name space (not the source file tree) from which to copy name's content. All fields except name are optional. If a field such as perm or uid is not given, or is given as -, its value is taken from the existing file.

A name starting with $ is taken as a reference to an environment variable (see sh(1) and env(3)) and replaced by the value of that variable. If the first name in a directory is +, all of the files are represented, and all subdirectories recursively. If the first name is *, all of the names in the corresponding existing directory are represented, but only the names of subdirectories, not their content. If the first name is %, only non-directory names are represented excluding both the names and content of subdirectories.

Perm has the form:

[d] [a] [l] oct

where the optional letters set file attributes (d directory, a append-only, and l exclusive-use), and oct is an octal number giving the permissions for user, group and others (see chmod(1)).

EXAMPLES

Denote all files in a given file system:

+

Denote all files in the current user's home directory:

usr
	$user

Specify a subset of files in /dis:

dis
	*
	install
		*
	lib
		arg.dis
		names.dis

FILES

/lib/proto
directory of prototype files
/lib/proto/all
prototype for whole hierarchy (ie, line containing +)
/lib/proto/portproto
generic prototype file

SEE ALSO

fs(1), fsproto(2), kfs(4), mkfs(8)

PROTO(6 ) Rev:  Tue Mar 31 02:42:38 GMT 2015