forsyth20100205-1101bb3d01d16 years agoHistory
283 lines · 5.7 KB · Text
RawDownload
.TH BIND 1.SH NAMEbind, mount, unmount \- change name space.SH SYNOPSIS.B bind[.I option ...].I source target.PP.B mount[.I option ...].I source target[.I spec].PP.B unmount[.I source].I target.SH DESCRIPTIONThe.IR bindand.IR mountcommands modify the file name space of the current processand other processes in the same name space group(see.IR sys-pctl (2)).For both calls, .I targetis the name of an existing file or directory in thecurrent name space where the modification is to be made..PPFor.IR bind ,.I sourceis the name of an existing file or directory in the current name space.After a successful.IR bind ,the file name.I targetis an alias for the object originally named by.IR source ;if the modification doesn't hide it,.I sourcewill also still refer to its original file.The evaluation of.I source(see.IR sys-intro (2))happens at the time of the.IR bind ,not when the binding is later used..PPBoth.I sourceand.I targetfiles must be of the same type: either both directories or both files..PPFor .IR mount,.I sourcecan be a shell command,a network address,or a file name.If.I sourceis surrounded by brace characters.RB ( {and.BR } ),it is invoked as a.IR sh (1)command and its standard input is mounted (noauthentication takes place in this case).If.I sourcecontains an exclamation mark.RB ( ! ),or there is no file of that name,it is assumed to be a network address for a machine actingas a file server.This argument should then conform to the conventionsdescribed in.IR dial (2).Otherwise.I sourceshould be the name of a file that when opened gives a connectionto a file server, something serving the 9P protocoldescribed in.IR intro (5),formerly called `Styx'.The optional.I specargument to.I mountis passed in the.IR attach (5)message and selects amongst different file trees offered by the server..PPThe effects of.I bindand.I mountcan be undone by.IR unmount .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 on.I targetis unmounted..PPBy default,.I bindand.IR mountreplace the.I targetfile by the new one,.IR source .Henceforth, an evaluation of the pathname.I targetwill be translated to the new file.If they are directories (for.IR mount ,this condition is true by definition),.I targetbecomes a.I "union directory"consisting of one directory (the .IR sourcedirectory)..PPA union directory unites the contents of the source and target directories.If the same name appears in both directories, the name used is the one in thedirectory that is bound before the other.In particular, if the directories have subdirectories of the same name, onlythe contents of the subdirectory in the top directory will be seen.If the subdirectory contents are themselves to be united, that must be donefirst in a separate.I bindor.IR mount ..PPNote that the.B #character in the name of a kernel devicemust be quoted when used in a.I bindor.I unmountcommand, or the shell will take it as the start of a comment..PPOptions control aspects of the modification to the name space:.TP.B -bBoth files must be directories.Add the .IR sourcedirectory to the beginningof the union directory represented by the .IR target directory..TP.B -aBoth files must be directories.Add the .IRsource directory to the endof the union directory represented by the .IR target directory..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 beenbound or mounted with the.B -coption.If that directory has not got write permission,the create fails..TP.B -qExit quietly without printing a diagnostic if the bind or mount fails..TP.B -AFor .I mountonly. Do not authenticate the connection to the server before proceeding with.IR mount .Otherwise the connection is authenticated by.IR security-auth (2)..TP.BI -C " alg"For.I mountonly,specify the algorithm, .IR alg ,to be used following authentication for digesting or encryption. See .IR ssl (3)for the supported algorithms.The default is.BR none :.IR ssl (3)is not used after authentication..TP.BI -k " kfile "For mount only, specify the keyfile to be used when authenticating.The default is.BI /usr/ user /keyring/default .See .IR keyring-auth (2)for more details.(If the.B -9option is given, this option is interpreted differently: see below.).TP.B -9For.I mountonly, and only when hosted on Plan 9..I Sourceis a Plan 9 file server; use Plan 9's.I factotumas authentication agent to authenticate the mount.(Note that a Plan 9 file service that is known not to authenticate can be mounted fromany Inferno host, by using the.B -Aoption to suppress Inferno authentication.)The existing Plan 9 file servers do not encrypt connections, so the.B -Coption is ignored.The value of the.B -koption is added to the key specification for.IR factotum (4)for authentication..TP.B -PWhen.I sourceis a network address, use.IR styxpersist (2)to try to simulate a permanent connection, even should the server reboot.Note the caveats on that page..TP.B -oFor.I mountonly,the file server serves the 1995 version of Inferno's Styx protocol, and.I mountinserts a process that translates to the current version..SH SOURCE.B /appl/cmd/bind.b.br.B /appl/cmd/mount.b.br.B /appl/cmd/unmount.b.SH SEE ALSO.IR sh (1),.IR dial (2),.IR keyring-auth (2),.IR security-auth (2),.IR sys-intro (2),.IR sys-bind (2),.IR intro (3),.IR getauthinfo (8)