aboutsummaryrefslogtreecommitdiff
path: root/man/man1/9p.html
blob: 449d0eb59da3c2379be12d51f7f4021e594ed76d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<head>
<title>9p(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>9P(1)</b><td align=right><b>9P(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    9p &ndash; read and write files on a 9P server<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>read</font></tt> <i>path<br>
    </i><tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>readfd</font></tt> <i>path 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    </i>
    <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>write</font></tt> <i>path<br>
    </i><tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>writefd</font></tt> <i>path 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    </i>
    <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>stat</font></tt> <i>path<br>
    </i>
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>9p</i> is a trivial 9P client that can access a single file on a 9P
    server. It can be useful for manual interaction with a 9P server
    or for accessing simple 9P services from within shell scripts.
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The first argument is a command, one of:<br>
    <tt><font size=+1>read</font></tt>print the contents of <i>path</i> to standard output<br>
    <tt><font size=+1>write<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        write data on standard input to <i>path<br>
        </i>
    </table>
    <tt><font size=+1>readfd</font></tt>, <tt><font size=+1>writefd<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        like <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt> but use <i>openfd</i>(9p) instead of <i>open</i>; this masks
        errors and is mainly useful for debugging the implementation of
        <i>openfd<br>
        </i>
    </table>
    <tt><font size=+1>stat</font></tt>execute <i>stat (9p)</i> on <i>path</i> and print the result 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>9p</i> dials <i>address</i> to connect to the 9P server. If the <tt><font size=+1>&#8722;a</font></tt> option
    is not given, <i>9p</i> requires the <i>path</i> to be of the form <i>service</i><tt><font size=+1>/</font></tt><i>subpath</i>;
    it connects to the Unix domain socket <i>service</i> in the name space
    directory (see <a href="../man4/intro.html"><i>intro</i>(4)</a>) and then accesses <i>subpath</i>.<br>
    
</table>
<p><font size=+1><b>EXAMPLE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    To update <a href="../man4/plumber.html"><i>plumber</i>(4)</a>&#8217;s copy of your plumbing rules after editing
    <tt><font size=+1>$HOME/lib/plumbing</font></tt>:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>cat $HOME/lib/plumbing | 9p write plumb/rules<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </font></tt>
        
    </table>
    To display the contents of the current <a href="../man4/acme.html"><i>acme</i>(4)</a> window:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>9p read acme/$winid/body<br>
        </font></tt>
    </table>
    
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/9p.c<br>
    </font></tt>
</table>
<p><font size=+1><b>SEE ALSO    </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <a href="../man4/intro.html"><i>intro</i>(4)</a>, <i>intro</i>(9p), <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a><br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>