Blob


1 <head>
2 <title>import(4) - Plan 9 from User Space</title>
3 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 </head>
5 <body bgcolor=#ffffff>
6 <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 <tr height=10><td>
8 <tr><td width=20><td>
9 <tr><td width=20><td><b>IMPORT(4)</b><td align=right><b>IMPORT(4)</b>
10 <tr><td width=20><td colspan=2>
11 <br>
12 <p><font size=+1><b>NAME </b></font><br>
14 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
16 import &ndash; import 9P resources from another system<br>
18 </table>
19 <p><font size=+1><b>SYNOPSIS </b></font><br>
21 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
23 <tt><font size=+1>import</font></tt> [ <tt><font size=+1>&#8722;df</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>ns</i> ] [ <tt><font size=+1>&#8722;p</font></tt> <i>prog</i> ] [ <tt><font size=+1>&#8722;s</font></tt> <i>service</i> ] <i>system<br>
24 </i>
25 </table>
26 <p><font size=+1><b>DESCRIPTION </b></font><br>
28 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
30 <i>Import</i> presents the 9P service <i>service</i> (default <tt><font size=+1>plumb</font></tt>) running
31 on <i>system</i> as a service on the local system, in the current name
32 space.
33 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
35 The <tt><font size=+1>&#8722;n</font></tt> option sets the remote name space directory where <i>import</i>
36 should expect to find <i>service</i>. If it is not specified, <i>import</i>
37 uses name of the local system&#8217;s name space directory. (Since name
38 space directories are conventionally inside <tt><font size=+1>/tmp</font></tt>, the path have
39 different meanings on the two systems.)
40 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
42 <i>Import</i> connects to <i>system</i> using <a href="../man1/ssh.html"><i>ssh</i>(1)</a>. It invokes <i>import</i> on the
43 remote system to carry out the remote side of the protocol. The
44 <tt><font size=+1>&#8722;p</font></tt> option specifies the path to <i>import</i> on the remote system, in
45 case it is not in the system search path.
46 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
48 The <tt><font size=+1>&#8722;d</font></tt> option turns on debugging. The <tt><font size=+1>&#8722;f</font></tt> option keeps <i>import</i> from
49 forking itself into the background, also useful for debugging.<br>
51 </table>
52 <p><font size=+1><b>EXAMPLE </b></font><br>
54 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
56 Suppose you run <tt><font size=+1>sam &#8722;r</font></tt> to the CPU server <i>anna</i>. <i>Sam</i> wants to talk
57 to a plumber on the local terminal, but the file names will refer
58 to files on <i>anna</i>.
59 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
61 To fix this problem, create a new name space directory and start
62 a new plumber on <i>anna</i>:<br>
64 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
66 <tt><font size=+1>remotens=/tmp/ns.`whoami`.on.`hostname`<br>
67 ssh anna mkdir $remotens<br>
68 ssh anna NAMESPACE=$remotens plumber<br>
69 </font></tt>Now import that plumber to the local name space before starting
70 <i>sam</i> and <i>9term</i>:<br>
71 <tt><font size=+1>NAMESPACE=/tmp/ns.anna<br>
72 mkdir $NAMESPACE<br>
73 import &#8722;n $remotens &#8722;s plumb anna<br>
74 sam &amp;<br>
75 9term ssh anna &amp;<br>
76 </font></tt>
77 </table>
79 </table>
80 <p><font size=+1><b>SOURCE </b></font><br>
82 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
84 <tt><font size=+1>/usr/local/plan9/src/cmd/import.c<br>
85 </font></tt>
86 </table>
87 <p><font size=+1><b>SEE ALSO </b></font><br>
89 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
91 <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>, <a href="../man4/intro.html"><i>intro</i>(4)</a><br>
93 </table>
95 <td width=20>
96 <tr height=20><td>
97 </table>
98 <!-- TRAILER -->
99 <table border=0 cellpadding=0 cellspacing=0 width=100%>
100 <tr height=15><td width=10><td><td width=10>
101 <tr><td><td>
102 <center>
103 <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
104 </center>
105 </table>
106 <!-- TRAILER -->
107 </body></html>