]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/srv
fix manpage references
[plan9front.git] / sys / man / 4 / srv
1 .TH SRV 4 
2 .SH NAME
3 srv, srvssh, 9fs \- start network file service
4 .SH SYNOPSIS
5 .B srv
6 [
7 .B -abcCemnNq
8 ] [
9 .B -s
10 .I seconds
11 ]
12 .RI [ net !] system\c
13 .RI [! service ]
14 [
15 .I srvname
16 [
17 .I mtpt
18 ] ]
19 .PP
20 .B srvssh
21 [
22 .B -r
23 ]
24 [
25 .B -R
26 ]
27 [
28 .B -s
29 ]
30 [
31 .B -u
32 .I u9fspath
33 ]
34 .I system
35 [
36 .I srvname
37 [
38 .I mtpt
39 ] ]
40 .PP
41 .B 9fs
42 .RI [ net !] system
43 .RI [ mountpoint ]
44 .SH DESCRIPTION
45 .I Srv
46 dials the given machine and initializes the connection to serve the
47 9P protocol.
48 By default, it connects to the
49 .L 9fs
50 (9P)
51 service, which for TCP is port 564.
52 It then creates in
53 .B /srv
54 a file named
55 .IR srvname .
56 Users can then
57 .B mount
58 (see
59 .IR bind (1))
60 the service, typically on a name in
61 .BR /n ,
62 to access the files provided by the remote machine.
63 If
64 .I srvname
65 is omitted, the first argument to
66 .I srv
67 is used.
68 Option
69 .B m
70 directs
71 .I srv
72 to mount the service on
73 .BI /n/ system
74 or onto
75 .I mtpt
76 if it is given.
77 Option
78 .B q
79 suppresses complaints if the
80 .B /srv
81 file already exists.
82 The 
83 .BR a ,
84 .BR b ,
85 .BR c ,
86 .BR C ,
87 and
88 .BR n ,
89 .B N
90 options are used to control the mount flags as in
91 .I mount
92 (see
93 .IR bind (1)).
94 The
95 .B e
96 option causes
97 .I srv
98 to treat
99 .I system
100 as a shell command to be executed rather than
101 an address to be dialed.
102 The
103 .B s
104 option causes
105 .I srv
106 to sleep for the specified number of seconds
107 after establishing the connection
108 before posting and mounting it.
109 This is sometimes needed by
110 .IR srvssh .
111 .PP
112 The specified
113 .I service
114 must serve 9P.  Usually
115 .I service
116 can be omitted; when calling some
117 non-Plan-9 systems, a
118 .I service
119 such as
120 .B u9fs
121 must be mentioned explicitly.
122 .PP
123 The
124 .I 9fs
125 command does the
126 .I srv
127 and the
128 .I mount
129 necessary to make available the files of
130 .I system
131 on network
132 .IR net .
133 The files are mounted on
134 .IR mountpoint ,
135 if given;
136 otherwise they are mounted on
137 .BI /n/ system\f1.
138 If
139 .I system
140 contains
141 .L /
142 characters, only the last element of
143 .I system
144 is used in the
145 .B /n
146 name.
147 .PP
148 .I 9fs
149 recognizes some special names, such as
150 .B dump
151 to make the dump file system available on
152 .BR /n/dump .
153 .I 9fs
154 is an
155 .IR rc (1)
156 script; examine it to see what local conventions apply.
157 .PP
158 .I Srvssh
159 is an
160 .IR rc (1)
161 command that
162 connects to a remote Unix system via 
163 .IR ssh (1)
164 and starts
165 .BR u9fs .
166 The
167 .B -u
168 option specifies the path to the
169 .B u9fs
170 binary on the remote system.
171 (By default, an unrooted path of
172 .B u9fs
173 is used; if the binary is in the path of
174 the remote SSH server, you don't need the
175 .B -u
176 option.)
177 For information about the other options,
178 see the introductory comment in
179 .BR /rc/bin/srvssh .
180 The arguments are the same as
181 .IR srv .
182 .SH EXAMPLES
183 To see kremvax's and deepthought's files in
184 .B /n/kremvax
185 and
186 .BR /n/deepthought :
187 .IP
188 .EX
189 9fs kremvax
190 9fs hhgttg /n/deepthought
191 .EE
192 .PP
193 To connect to an instance of the Unix server
194 .I u9fs
195 started via
196 .IR ssh (1):
197 .IP
198 .EX
199 srvssh unix
200 .EE
201 .SH FILES
202 .TF /srv/*
203 .TP
204 .B /srv/*
205 ports to file systems and servers posted by
206 .I srv
207 and
208 .I 9fs
209 .SH SOURCE
210 .B /sys/src/cmd/srv.c
211 .br
212 .B /rc/bin/9fs
213 .br
214 .B /rc/bin/srvssh
215 .SH "SEE ALSO"
216 .IR bind (1),
217 .IR auth (2),
218 .IR dial (2),
219 .IR srv (3),
220 .IR exportfs (4),
221 .IR import (4),
222 .IR ftpfs (4),
223 .SH BUGS
224 .I Srv
225 does not explicitly report failures of
226 .I auth_proxy
227 (see
228 .IR auth (2));
229 .I mount
230 (see
231 .IR bind (1))
232 does.