shithub: 9ferno

ref: b502a62da2ec6058923db94f87ecc2d29db2fa77
dir: /man/8/mkfs/

View raw version
mkfs, mkext \- archive or update a file system
.B disk/mkfs
.RB [ -aprvxS ]
.RB [ -d
.IR dest ]
.RB [ -n
.IR name ]
.RB [ -s
.IR source ]
.RB [ -u
.IR users ]
.RB [ -z
.IR n ]
.RB [ -G
.IR group ]
.RB [ -U
.IR user ]
.I proto ...
.B disk/mkext
.RB [ -d
.IR name ]
.RB [ -f ]
.RB [ -h ]
.RB [ -T ]
.RB [ -u ]
.RB [ -v ]
.I file ...
.I Mkfs
copies files from the file tree
.I source
.BR / )
to a
.B kfs
file system (see
.IR kfs (4))
assumed to be mounted on
.I dest
.BR /n/kfs ).
.I proto
files are read,
and any files specified in them that are out of date are copied to
.IR dest .
.IR proto (6)
for the description of file system prototype files.
.I Mkfs
by default copies only those files that are out of date.
Such a file is first copied into a temporary
file in the appropriate destination directory
and then moved to the destination file.
Files in the
.I kfs
file system that are not specified in the
.I proto
are not updated and not removed.
The options to
.I mkfs
.TF "-s source"
.B -a
Instead of writing to a
.B kfs
file system, write an archive file to standard output, suitable for
.IR mkext .
All files in
.I proto
are archived,
not just those out of date.
.B -x
For use with
.BR -a ,
this option writes a list of file names, dates, and sizes to standard output
rather than producing an archive file.
.BI -n " name"
.BI kfs. name .cmd
as the name of the command file for the
.IR kfs (4)
assumed to be mounted on
.IR dest .
.B -p
Update the permissions of a file even if it is up to date.
.B -r
Copy all files.
.BI -s " source"
Copy from files rooted at the tree
.IR source .
.BI -u " users"
Before copying any other file, copy file
.I users
.IB dest /adm/users ,
and if the
.B -n
option was given, also issue the
.IR kfs (4)
.B users
to update
.IR kfs 's
own user list.
.B -v
Print the names of all of the files as they are copied.
.BI -z " n"
Copy files assuming
.I kfs
is using a block size of
.I n
(default 1024).
If a block contains only 0-valued bytes, it is not copied.
.B -S
For use with the
.B -d
make owner and group of each file copied match the original.
.BI -G " group"
Force all files copied to have the given
.IR group .
.BI -U " user"
Force all files copied to be owned by the given
.IR user .
.I Mkext
unpacks an archive created by the
.B -a
option of
.IR mkfs ,
read from the standard input.
If one or more files are specified on the command line,
only those files are unpacked.
If a
.I file
is a directory,
all files and subdirectories of that directory are also unpacked.
When a file is unpacked, the entire path is created if it
does not exist.
If no files are specified, the entire archive is unpacked;
in this case, missing intermediate directories are not created.
The options are:
.BI -d " dir"
.I dir
.LR / )
as the root directory when unpacking the archive.
.B -h
Print headers for the files on standard output
instead of unpacking the files.
.B -T
Restore the modification times of the files.
.B -u
Set the owners of the files created to correspond to
those in the archive and restore the modification times of the files.
.B -v
Print the names and sizes of files as they are extracted.
Make an archive to establish a new file system
(assuming that the output file
.B arch
is not referenced by
.BR proto ):
bind '#U' /n/local
disk/mkfs -a -s /n/local proto > arch
Unpack that archive on another machine:
mount tcp!server /n/remote
disk/mkext -u -d /n/remote < arch
.TF /lib/proto/portproto
.B /lib/proto
directory of prototype files.
.B /lib/proto/all
contains a single + (archive any directory structure)
.B /appl/cmd/disk/mkfs.b
.B /appl/cmd/disk/mkext.b
.IR fs (1),
.IR kfs (4),
.IR proto (6),
.IR kfscmd (8)