Blob
1 .TH 9P 12 .SH NAME3 9p \- read and write files on a 9P server4 .SH SYNOPSIS5 .B 9p6 [7 .B -a8 .I addr9 ]10 .B read11 .I path12 .br13 .B 9p14 [15 .B -a16 .I addr17 ]18 .B readfd19 .I path20 .PP21 .B 9p22 [23 .B -a24 .I addr25 ]26 .B write27 .I path28 .br29 .B 9p30 [31 .B -a32 .I addr33 ]34 .B writefd35 .I path36 .PP37 .B 9p38 [39 .B -a40 .I addr41 ]42 .B stat43 .I path44 .SH DESCRIPTION45 .I 9p46 is a trivial 9P client that can access a single file on a 9P server.47 It can be useful for manual interaction with a 9P server or for48 accessing simple 9P services from within shell scripts.49 .PP50 The first argument is a command, one of:51 .TP52 .B read53 print the contents of54 .I path55 to standard output56 .TP57 .B write58 write data on standard input to59 .I path60 .TP61 .BR readfd ", " writefd62 like63 .B read64 and65 .B write66 but use67 .IR openfd (9p)68 instead of69 .IR open ;70 this masks errors and is mainly useful for debugging71 the implementation of72 .I openfd73 .TP74 .B stat75 execute76 .I stat (9p)77 on78 .I path79 and print the result80 .PD81 .PP82 .I 9p83 dials84 .I address85 to connect to the 9P server.86 If the87 .B -a88 option is not given,89 .I 9p90 requires the91 .I path92 to be of the form93 .IB service / subpath \fR;94 it connects to the Unix domain socket95 .I service96 in the name space directory97 (see98 .IR intro (4))99 and then accesses100 .IR subpath .101 .SH EXAMPLE102 To update103 .IR plumber (4)'s104 copy of your plumbing rules after editing105 .BR $HOME/lib/plumbing :106 .IP107 .EX108 cat $HOME/lib/plumbing | 9p write plumb/rules109 .EE110 .PP111 To display the contents of the current112 .IR acme (4)113 window (specified by the environment variable114 .BR $winid )115 on standard output:116 .IP117 .EX118 9p read acme/$winid/body119 .EE120 .SH SOURCE121 .B /usr/local/plan9/src/cmd/9p.c122 .SH SEE ALSO123 .IR intro (4),124 .IR intro (9p),125 .IR 9pclient (3)