]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/bind
aes(2): mention aesCBC bug
[plan9front.git] / sys / man / 1 / bind
1 .TH BIND 1
2 .SH NAME
3 bind, mount, unmount \- change name space
4 .SH SYNOPSIS
5 .B bind
6 [
7 .I option ...
8 ]
9 .I new old
10 .PP
11 .B mount
12 [
13 .I option ...
14 ]
15 .I servename old
16 [
17 .I spec
18 ]
19 .PP
20 .B unmount
21 [
22 .I new
23 ]
24 .I old
25 .SH DESCRIPTION
26 .I Bind
27 and
28 .I mount
29 modify the file name space of the current process
30 and other processes in the same name space group
31 (see
32 .IR fork (2)).
33 For both calls,
34 .I old
35 is the name of an existing file or directory in the
36 current name space where the modification is to be made.
37 .PP
38 For
39 .IR bind ,
40 .I new
41 is the name of another (or possibly the same)
42 existing file or directory in
43 the current name space.
44 After a successful
45 .IR bind ,
46 the file name
47 .I old
48 is an alias for the object originally named by
49 .IR new ;
50 if the modification doesn't hide it,
51 .I new
52 will also still refer to its original file.
53 The evaluation of
54 .I new
55 (see
56 .IR intro (2))
57 happens at the time of the
58 .IR bind ,
59 not when the binding is later used.
60 .PP
61 The
62 .I servename
63 argument to
64 .I mount
65 is the name of a file that, when opened, yields an
66 existing connection to a file server.
67 Almost always,
68 .I servename
69 will be a file in
70 .B /srv
71 (see
72 .IR srv (3)).
73 In the discussion below,
74 .I new
75 refers to the file named by the
76 .I new
77 argument to
78 .I bind
79 or the root directory of the service
80 available in
81 .I servename
82 after a
83 .IR mount .
84 Either both
85 .I old
86 and
87 .I new
88 files must be directories,
89 or both must not be directories.
90 .PP
91 Options control aspects of the modification to the name space:
92 .TP 10
93 (none)
94 Replace the
95 .I old
96 file by the new one.
97 Henceforth, an evaluation of
98 .I old
99 will be translated to the new file.
100 If they are directories (for
101 .IR mount ,
102 this condition is true by definition),
103 .I old
104 becomes a
105 .I "union directory"
106 consisting of one directory (the new file).
107 .TP
108 .B -b
109 Both files must be directories.
110 Add the new directory to the beginning
111 of the union directory represented by the old file.
112 .TP
113 .B -a
114 Both files must be directories.
115 Add the new directory to the end
116 of the union directory represented by the old file.
117 .TP
118 .B -c
119 This can be used in addition to any of the above to permit
120 creation in a union directory.
121 When a new file is created in a union directory,
122 it is placed in the first element of the union that has been bound or mounted with the
123 .B -c
124 flag.
125 If that directory does not have write permission, the create fails.
126 .TP
127 .B -C
128 (Only in
129 .IR mount .)
130 By default, file contents are always retrieved from the server.
131 With this option, the kernel may instead use a local cache to satisfy
132 .IR read (5)
133 requests for files accessible through this mount point.
134 The currency of cached data for a file is verified at each
135 .IR open (5)
136 of the file from this client machine.
137 .TP
138 .B -q
139 Exit silently if the
140 .B bind
141 or
142 .B mount
143 operation fails.
144 .PD
145 .PP
146 .I Mount
147 takes three additional options.
148 The first,
149 .B -k
150 .IR keypattern ,
151 constrains the set of 
152 .IR factotum (4)
153 keys used for an authenticated mount.
154 The second,
155 .BR -n ,
156 causes
157 .I mount
158 to skip authentication entirely.
159 The third,
160 .BR -N ,
161 skips authentication and specifies
162 .B none
163 as the username to the fileserver.
164 .PP
165 The
166 .I spec
167 argument to
168 .I mount
169 is passed in the
170 .IR attach (5)
171 message to the server, and selects among different
172 file trees served by the server.
173 .PP
174 The
175 .IR srv (3)
176 service registry device, normally bound to
177 .BR /srv ,
178 is a convenient rendezvous point for services that can be mounted.
179 After bootstrap, the file
180 .B /srv/boot
181 contains the communications port to the file system from which
182 the system was loaded.
183 .PP
184 The effects of
185 .I bind
186 and
187 .I mount
188 can be undone with the
189 .I unmount
190 command.
191 If two arguments are given to
192 .IR unmount ,
193 the effect is to undo a
194 .I bind
195 or
196 .I mount
197 with the same arguments.
198 If only one argument is given,
199 everything bound to or mounted upon
200 .I old
201 is unmounted.
202 .SH EXAMPLES
203 To compile a program with the C library from July 16, 1992:
204 .IP
205 .EX
206 mount /srv/boot /n/dump dump
207 bind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.a
208 mk
209 .EE
210 .SH SOURCE
211 .B /sys/src/cmd/bind.c
212 .br
213 .B /sys/src/cmd/mount.c
214 .br
215 .B /sys/src/cmd/unmount.c
216 .SH SEE ALSO
217 .IR bind (2),
218 .IR open (2),
219 .IR srv (3),
220 .IR srv (4)