diff options
| author | forsyth <forsyth@vitanuova.com> | 2009-08-09 20:15:09 +0100 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2009-08-09 20:15:09 +0100 |
| commit | f064c5817e37b6366e5ed7264663ad94867175ee (patch) | |
| tree | b6e9216e9b6d15412fd8ddd521ae8c448bdaf2f4 /man | |
| parent | c29b1ebe0080f89b861e1aab934ab57e93338388 (diff) | |
20080809-2014
Diffstat (limited to 'man')
| -rw-r--r-- | man/8/mkfs | 154 |
1 files changed, 98 insertions, 56 deletions
@@ -3,7 +3,9 @@ mkfs, mkext \- archive or update a file system .SH SYNOPSIS .B disk/mkfs -.RB [ -aprvx ] +.RB [ -aprvxS ] +.RB [ -d +.IR dest ] .RB [ -n .IR name ] .RB [ -s @@ -12,15 +14,23 @@ mkfs, mkext \- archive or update a file system .IR users ] .RB [ -z .IR n ] +.RB [ -G +.IR group ] +.RB [ -U +.IR user ] .I proto ... .PP .B disk/mkext .RB [ -d .IR name ] -.RB [ -u ] +.RB [ -f ] .RB [ -h ] +.RB [ -T ] +.RB [ -u ] .RB [ -v ] +[ .I file ... +] .SH DESCRIPTION .I Mkfs copies files from the file tree @@ -30,24 +40,22 @@ copies files from the file tree to a .B kfs file system (see -.IR kfs (4)). -The kfs service is mounted on -.BR /n/kfs , -and -.BR /adm/users , -if it exists, is copied to -.BR /n/kfs/adm/users . +.IR kfs (4)) +assumed to be mounted on +.I dest +(default: +.BR /n/kfs ). The .I proto files are read, and any files specified in them that are out of date are copied to -.BR /n/kfs . +.IR dest . See .IR proto (6) for the description of file system prototype files. .PP .I Mkfs -copies only those files that are out of date. +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. @@ -61,88 +69,122 @@ are not updated and not removed. The options to .I mkfs are: -.TF "s source" +.TF "-s source" .TP -.B a +.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 -.IR proto , -not just those out of date, are archived. +.I proto +are archived, +not just those out of date. .TP -.B x +.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. .TP -.BI "n " name +.BI -n " name" Use -.RI kfs. name -as the name of the kfs service (default -.BR kfs ). +.BI kfs. name .cmd +as the name of the command file for the +.IR kfs (4) +assumed to be mounted on +.IR dest . .TP -.B p +.B -p Update the permissions of a file even if it is up to date. .TP -.B r +.B -r Copy all files. .TP -.BI "s " source +.BI -s " source" Copy from files rooted at the tree .IR source . .TP -.BI "u " users -Copy file +.BI -u " users" +Before copying any other file, copy file .I users into -.B /adm/users -in the new system. +.IB dest /adm/users , +and if the +.B -n +option was given, also issue the +.IR kfs (4) +command +.B users +to update +.IR kfs 's +own user list. .TP -.B v +.B -v Print the names of all of the files as they are copied. .TP -.BI "z " n -Copy files assuming kfs block +.BI -z " n" +Copy files assuming +.I kfs +is using a block size of .I n -(default 1024) -bytes long. +bytes +(default 1024). If a block contains only 0-valued bytes, it is not copied. +.TP +.B -S +For use with the +.B -d +option, +make owner and group of each file copied match the original. +.TP +.BI -G " group" +Force all files copied to have the given +.IR group . +.TP +.BI -U " user" +Force all files copied to be owned by the given +.IR user . .PD .PP .I Mkext -unpacks archive files made by the +unpacks an archive created by the .B -a option of -.IR mkfs . -The -.B -d -option specifies a directory (default -.BR /n/kfs ) -to serve as the root of the unpacked file system. -The -.B -u -option, to be used only when initializing a new -.IR kfs (4) -file system, sets the owners of the files created to correspond to -those in the archive and restores the modification times of the files. -(This is only permitted at the initial load of the files into a file -system.) -Each file on the command line is unpacked in one pass through the archive. -If the file is a directory, +.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 -.B -v -option prints the names and sizes of files as they are extracted; +The options are: +.TP +.BI -d " dir" +Treat +.I dir +(default +.LR / ) +as the root directory when unpacking the archive. +.TP .B -h -prints headers for the files on standard output +Print headers for the files on standard output instead of unpacking the files. +.TP +.B -T +Restore the modification times of the files. +.TP +.B -u +Set the owners of the files created to correspond to +those in the archive and restore the modification times of the files. +.TP +.B -v +Print the names and sizes of files as they are extracted. .SH EXAMPLES .PP Make an archive to establish a new file system @@ -153,7 +195,7 @@ is not referenced by .IP .EX bind '#U' /n/local -disk/mkfs -a -u files/adm.users -s /n/local proto > arch +disk/mkfs -a -s /n/local proto > arch .EE .PP Unpack that archive on another machine: @@ -168,8 +210,8 @@ disk/mkext -u -d /n/remote < arch .B /lib/proto directory of prototype files. .TP -.B /lib/proto/portproto -generic prototype file. +.B /lib/proto/all +contains a single + (archive any directory structure) .SH SOURCE .B /appl/cmd/disk/mkfs.b .br |
