215 lines · 3.9 KB · Text
RawDownload
.TH BIND 1.SH NAMEbind, mount, unmount \- change name space.SH SYNOPSIS.B bind[.I option ...].I new old.PP.B mount[.I option ...].I servename old[.I spec].PP.B unmount[.I new].I old.SH DESCRIPTION.I Bindand.I mountmodify the file name space of the current processand other processes in the same name space group(see.IR fork (2)).For both calls,.I oldis the name of an existing file or directory in thecurrent name space where the modification is to be made..PPFor.IR bind ,.I newis the name of another (or possibly the same)existing file or directory inthe current name space.After a successful.IR bind ,the file name.I oldis an alias for the object originally named by.IR new ;if the modification doesn't hide it,.I newwill also still refer to its original file.The evaluation of.I new(see.IR intro (2))happens at the time of the.IR bind ,not when the binding is later used..PPThe.I servenameargument to.I mountis the name of a file that, when opened, yields anexisting connection to a file server.Almost always,.I servenamewill be a file in.B /srv(see.IR srv (3)).In the discussion below,.I newrefers to the file named by the.I newargument to.I bindor the root directory of the serviceavailable in.I servenameafter a.IR mount .Either both.I oldand.I newfiles must be directories,or both must not be directories..PPOptions control aspects of the modification to the name space:.TP 10(none)Replace the.I oldfile by the new one.Henceforth, an evaluation of.I oldwill be translated to the new file.If they are directories (for.IR mount ,this condition is true by definition),.I oldbecomes a.I "union directory"consisting of one directory (the new file)..TP.B -bBoth files must be directories.Add the new directory to the beginningof the union directory represented by the old file..TP.B -aBoth files must be directories.Add the new directory to the endof the union directory represented by the old file..TP.B -cThis can be used in addition to any of the above to permitcreation in a union directory.When a new file is created in a union directory,it is placed in the first element of the union that has been bound or mounted with the.B -cflag.If that directory does not have write permission, the create fails..TP.B -C(Only in.IR mount .)By default, file contents are always retrieved from the server.With this option, the kernel may instead use a local cache to satisfy.IR read (5)requests for files accessible through this mount point.The currency of cached data for a file is verified at each.IR open (5)of the file from this client machine..TP.B -qExit silently if the.B bindor.B mountoperation fails..PD.PP.I Mounttakes two additional options.The first,.B -k.IR keypattern ,constrains the set of .IR factotum (4)keys used for an authenticated mount.The second,.BR -n ,causes.I mountto skip authentication entirely..PPThe.I specargument to.I mountis passed in the.IR attach (5)message to the server, and selects among differentfile trees served by the server..PPThe.IR srv (3)service registry device, normally bound to.BR /srv ,is a convenient rendezvous point for services that can be mounted.After bootstrap, the file.B /srv/bootcontains the communications port to the file system from whichthe system was loaded..PPThe effects of.I bindand.I mountcan be undone with the.I unmountcommand.If two arguments are given to.IR unmount ,the effect is to undo a.I bindor.I mountwith the same arguments.If only one argument is given,everything bound to or mounted upon.I oldis unmounted..SH EXAMPLESTo compile a program with the C library from July 16, 1992:.IP.EXmount /srv/boot /n/dump dumpbind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.amk.EE.SH SOURCE.B /sys/src/cmd/bind.c.br.B /sys/src/cmd/mount.c.br.B /sys/src/cmd/unmount.c.SH SEE ALSO.IR bind (2),.IR open (2),.IR srv (3),.IR srv (4)