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 [28 .B -l29 ]30 .I path31 .br32 .B 9p33 [34 .B -a35 .I addr36 ]37 .B writefd38 .I path39 .PP40 .B 9p41 [42 .B -a43 .I addr44 ]45 .B stat46 .I path47 .SH DESCRIPTION48 .I 9p49 is a trivial 9P client that can access a single file on a 9P server.50 It can be useful for manual interaction with a 9P server or for51 accessing simple 9P services from within shell scripts.52 .PP53 The first argument is a command, one of:54 .TP55 .B read56 print the contents of57 .I path58 to standard output59 .TP60 .B write61 write data on standard input to62 .IR path ;63 the64 .B -l65 option causes66 .I write67 to write one line at a time68 .TP69 .BR readfd ", " writefd70 like71 .B read72 and73 .B write74 but use75 .IR openfd (9p)76 instead of77 .IR open ;78 this masks errors and is mainly useful for debugging79 the implementation of80 .I openfd81 .TP82 .B stat83 execute84 .I stat (9p)85 on86 .I path87 and print the result88 .PD89 .PP90 .I 9p91 dials92 .I address93 to connect to the 9P server.94 If the95 .B -a96 option is not given,97 .I 9p98 requires the99 .I path100 to be of the form101 .IB service / subpath \fR;102 it connects to the Unix domain socket103 .I service104 in the name space directory105 (see106 .IR intro (4))107 and then accesses108 .IR subpath .109 .SH EXAMPLE110 To update111 .IR plumber (4)'s112 copy of your plumbing rules after editing113 .BR $HOME/lib/plumbing :114 .IP115 .EX116 cat $HOME/lib/plumbing | 9p write plumb/rules117 .EE118 .PP119 To display the contents of the current120 .IR acme (4)121 window:122 .IP123 .EX124 9p read acme/$winid/body125 .EE126 .SH SOURCE127 .B \*9/src/cmd/9p.c128 .SH SEE ALSO129 .IR intro (4),130 .IR intro (9p),131 .IR 9pclient (3)