338 lines · 4.9 KB · Text
RawDownload
.TH SRV 4 .SH NAMEsrv, srvold9p, 9fs, srvssh \- start network file service.SH SYNOPSIS.B srv[.B -abcCemnq] [.B -s.I seconds].RI [ net !] system\c.RI [! service ][.I srvname[.I mtpt] ].PP.B srvssh[.B -r][.B -R][.B -s][.B -u.I u9fspath].I system[.I srvname[.I mtpt] ].PP.B 9fs.RI [ net !] system.RI [ mountpoint ].PP.in +0.5i.ti -0.5i.B srvold9p[.B -abcCdF] [.B -p.I servicename] [.B -s|.B -m.I mountpoint] [.B -u.I user] [.B -x.I command|.B -n.I network-addr|.B -f.I file].br.in -0.5i.SH DESCRIPTION.I Srvdials the given machine and initializes the connection to serve the9P protocol.By default, it connects to the.L 9fs(9P)service, which for TCP is port 564.It then creates in.B /srva file named.IR srvname .Users can then.B mount(see.IR bind (1))the service, typically on a name in.BR /n ,to access the files provided by the remote machine.If.I srvnameis omitted, the first argument to.I srvis used.Option.B mdirects.I srvto mount the service on.BI /n/ systemor onto.I mtptif it is given.Option.B qsuppresses complaints if the.B /srvfile already exists.The .BR a ,.BR b ,.BR c ,.BR C ,and.B noptions are used to control the mount flags as in.I mount(see.IR bind (1)).The.B eoption causes.I srvto treat.I systemas a shell command to be executed rather thanan address to be dialed.The.B soption causes.I srvto sleep for the specified number of secondsafter establishing the connectionbefore posting and mounting it.This is sometimes needed by.IR srvssh ..PPThe specified.I servicemust serve 9P.  Usually.I servicecan be omitted; when calling somenon-Plan-9 systems, a.I servicesuch as.B u9fsmust be mentioned explicitly..PPThe.I 9fscommand does the.I srvand the.I mountnecessary to make available the files of.I systemon network.IR net .The files are mounted on.IR mountpoint ,if given;otherwise they are mounted on.BI /n/ system\f1.If.I systemcontains.L /characters, only the last element of.I systemis used in the.B /nname..PP.I 9fsrecognizes some special names, such as.B dumpto make the dump file system available on.BR /n/dump ..I 9fsis an.IR rc (1)script; examine it to see what local conventions apply..PP.I Srvsshis an.IR rc (1)command thatconnects to a remote Unix system via .IR ssh (1)and starts.IR u9fs (4).The.B -uoption specifies the path to the.B u9fsbinary on the remote system.(By default, an unrooted path of.B u9fsis used; if the binary is in the path ofthe remote SSH server, you don't need the.B -uoption.)For information about the other options,see the introductory comment in.BR /rc/bin/srvssh .The arguments are the same as.IR srv ..PP.I Srvold9pis a compatibilty hack to allow Fourth Edition Plan 9 systemsto connect to older 9P servers.It functions as a variant of.I srvthat performs a version translation on the 9P messages on the underlying connection.Some of its options are the same as those of.IR srv ;the special ones are:.TF "-x commandxx".PD.TP.B -dEnable debugging..TP.B -FInsert a special (internal) filter process to the connection to maintainmessage boundaries; usually only needed on TCP connections..TP.BI -p\  servicenamePost the service under.IR srv (3)as.BI /srv/ servicename\f1..TP.BI -u\  userWhen connecting to the remote server, log in as.IR user .Since.I srvold9pdoes no authentication, and since new kernels cannot authenticate toold services, the likeliest value of.I useris.BR none ..TP.BI -x\  commandRun.I commandand use its standard input and output as the 9P service connection.If the.I commandstring contains blanks, it should be quoted..TP.BI -n\  network-addrDial.I network-addrto establish the connection..TP.BI -f\  fileUse.I file(typically an existing.IR srv (3)file) as the connection..PP.I Srvold9pis run automatically when a.IR cpu (1)call is received on the service port for the old protocol..SH EXAMPLESTo see kremvax's and deepthought's files in.B /n/kremvaxand.BR /n/deepthought :.IP.EX9fs kremvax9fs hhgttg /n/deepthought.EE.PPTo mount as user.B nonea connection to an older server kgbsun:.IP.EXsrvold9p -u none -m /n/kgbsun -p kgbsun -n il!kgbsun.EE.PPOther windows may then mount the connection directly:.IP.EXmount /srv/kgbsun /n/kgbsun.EE.PPTo connect to an instance of the Unix server.IR u9fs (4)started via.IR ssh (1):.IP.EXsrvssh unix.EE.SH FILES.TF /srv/*.TP.B /srv/*ports to file systems and servers posted by.I srvand.I 9fs.SH SOURCE.B /sys/src/cmd/srv.c.br.B /rc/bin/9fs.br.B /rc/bin/srvssh.br.B /sys/src/cmd/srvold9p.SH "SEE ALSO".IR bind (1),.IR auth (2),.IR dial (2),.IR srv (3),.IR exportfs (4),.IR import (4),.IR ftpfs (4),.IR u9fs (4).SH BUGS.I Srvdoes not explicitly report failures of.I auth_proxy(see.IR auth (2));.I mount(see.IR bind (1))does.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t