mkfs \- construct a file system
by writing on the special file
according to the directions
contains tokens separated by spaces or
The first token is the name of a file
to be copied onto block zero as
The second token is a number specifying the
size of the created file system.
Typically it will be the number of blocks on the device,
The next token is the number of i-nodes
The next set of tokens comprise the specification
File specifications consist of tokens
and the initial contents of the file.
The syntax of the contents field
The mode token for a file is a 6 character string.
specifies the type of the file.
specify regular, block special,
character special and directory files
The second character of the type
to specify set-user-id mode or not.
for the set-group-id mode.
is a three digit octal number giving the
owner, group, and other read, write, execute
tokens come after the mode; they specify the
user and group ID's of the owner of the file.
If the file is a regular file,
the next token is a pathname
whence the contents and size are copied.
If the file is a block or character special file,
two decimal number tokens
follow which give the major and minor device numbers.
If the file is a directory,
reads a list of names and
file specifications for the entries
The scan is terminated with the
If the prototype file cannot be opened and
its name consists of a string of digits,
builds a file system with a single
The size of the file system is the value
interpreted as a decimal number.
The number of i-nodes is calculated
as a function of the filsystem size.
The boot program is left uninitialized.
A sample prototype specification follows:
There should be some way to specify links.