NAME
bind, mount, unmount – change name space |
SYNOPSIS
bind [ option ... ] new old mount [ option ... ] servename old [ spec ]
unmount [ new ] old |
DESCRIPTION
Bind and mount modify the file name space of the current process
and other processes in the same name space group (see fork(2)).
For both calls, old is the name of an existing file or directory
in the current name space where the modification is to be made.
For bind, new is the name of another (or possibly the same) existing file or directory in the current name space. After a successful bind, the file name old is an alias for the object originally named by new; if the modification doesn't hide it, new will also still refer to its original file. The evaluation of new (see intro(2)) happens at the time of the bind, not when the binding is later used. The servename argument to mount is the name of a file that, when opened, yields an existing connection to a file server. Almost always, servename will be a file in /srv (see srv(3)). In the discussion below, new refers to the file named by the new argument to bind or the root directory of the service available in servename after a mount. Either both old and new files must be directories, or both must not be directories.
Options control aspects of the modification to the name space: Mount takes two additional options. The first, –k keypattern, constrains the set of factotum(4) keys used for an authenticated mount. The second, –n, causes mount to skip authentication entirely. The spec argument to mount is passed in the attach(5) message to the server, and selects among different file trees served by the server. The srv(3) service registry device, normally bound to /srv, is a convenient rendezvous point for services that can be mounted. After bootstrap, the file /srv/boot contains the communications port to the file system from which the system was loaded.
The effects of bind and mount can be undone with the unmount command.
If two arguments are given to unmount, the effect is to undo a
bind or mount with the same arguments. If only one argument is
given, everything bound to or mounted upon old is unmounted. |
EXAMPLES
To compile a program with the C library from July 16, 1992:
|
SOURCE
/sys/src/cmd/bind.c /sys/src/cmd/mount.c /sys/src/cmd/unmount.c |
SEE ALSO
bind(2), open(2), srv(3), srv(4) |