con 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. .TH CON 1
  2. .SH NAME
  3. con, telnet, rx, xms, xmr \- remote login, execution, and XMODEM file transfer
  4. .SH SYNOPSIS
  5. .B con
  6. [
  7. .B -CdnrRvsT
  8. ]
  9. [
  10. .B -b
  11. .I baud
  12. ]
  13. [
  14. .B -l
  15. [
  16. .I remuser
  17. ]
  18. ]
  19. [
  20. .B -c
  21. .I cmd
  22. ]
  23. .RI [ net !] machine
  24. .PP
  25. .B telnet
  26. [
  27. .B -dCrn
  28. ]
  29. .RI [ net !] machine
  30. .PP
  31. .B cu
  32. .I number
  33. .PP
  34. .B rx
  35. [
  36. .B -e
  37. ]
  38. [
  39. .B -l
  40. .I remuser
  41. ]
  42. .RI [ net !] machine
  43. [
  44. .I command-word ...
  45. ]
  46. .PP
  47. .B xms
  48. [
  49. .B -1p
  50. ]
  51. .I file
  52. .PP
  53. .B xmr
  54. .I file
  55. .SH DESCRIPTION
  56. .I Con
  57. connects to the computer whose network address is
  58. .IR net ! machine
  59. and logs in if possible.
  60. With no options, the account name used on the remote system is the same
  61. as that on the local system.
  62. Standard input and output go to the local machine.
  63. .PP
  64. Options are:
  65. .TP
  66. .B -b
  67. sets the baud rate of a dial-up connection to
  68. .IR baud .
  69. .TP
  70. .B -n
  71. if the input is a file or pipe, do not hang up the connection when EOF is received,
  72. but instead wait for the remote end to hang up.
  73. .TP
  74. .B -l
  75. with an argument causes
  76. .I remuser
  77. to be used as the account name on the remote system.
  78. Without an argument this option disables automatic login
  79. and a normal login session ensues.
  80. .TP
  81. .B -C
  82. forces cooked mode, that is, local echo.
  83. .TP
  84. .B -c
  85. runs
  86. .I cmd
  87. as if it had been typed as a command from the escape mode.
  88. This is used by
  89. .IR cu .
  90. .TP
  91. .B -v
  92. (verbose mode) causes information about connection attempts
  93. to be output to standard error. This can be useful when
  94. trying to debug network connectivity.
  95. .TP
  96. .B -d
  97. causes debugging information to be output to standard error.
  98. .TP
  99. .B -r
  100. suppresses printing of any carriage return followed by a new line.
  101. This is useful since carriage return is a printable character in
  102. Plan 9.
  103. .TP
  104. .B -R
  105. translates newlines to carriage returns and
  106. .IR "vice versa" .
  107. .TP
  108. .B -T
  109. translates incoming carriage returns to newlines.
  110. .TP
  111. .B -s
  112. strips received characters to 7 bits to forestall
  113. misinterpretation of
  114. .SM ASCII
  115. with parity as
  116. .SM UTF\c
  117. \&.
  118. .PP
  119. The
  120. .RB control\- \e
  121. character is a local escape.
  122. It prompts with
  123. .BR >>> .
  124. Legitimate responses to the prompt are
  125. .TP
  126. .B i
  127. Send a quit [sic] signal to the remote machine.
  128. .PD0
  129. .TP
  130. .B q
  131. Exit.
  132. .TP
  133. .B b
  134. Send a break.
  135. .TP
  136. .B .
  137. Return from the escape.
  138. .TP
  139. .B !cmd
  140. Run the command with the network connection as its
  141. standard input and standard output.
  142. Standard error will go to the screen.
  143. This is useful for transmitting and receiving files
  144. over the connections using programs such as
  145. .IR xms .
  146. .TP
  147. .B r
  148. Toggle printing of carriage returns.
  149. .PD
  150. .PP
  151. .I Telnet
  152. is similar to con, but uses the
  153. .I telnet
  154. protocol to communicate with the remote machine.
  155. It shares
  156. .I con's
  157. .BR -C ,
  158. .BR -d ,
  159. .BR -n ,
  160. and
  161. .BR -r
  162. options.
  163. .PP
  164. .I Rx
  165. executes one shell command
  166. on the remote machine as if logged in there,
  167. but with local standard input and output.
  168. A rudimentary shell environment is provided.
  169. If the target is a Plan 9 machine,
  170. .B $service
  171. there will be
  172. .BR rx .
  173. The
  174. .B \-e
  175. option causes a zero length message to be written to the
  176. connection when standard input is closed.
  177. The
  178. .B \-l
  179. option causes
  180. .I remuser
  181. to be used on the remote machine if the remote
  182. is a BSD machine.
  183. .PP
  184. Network addresses for both
  185. .I con
  186. and
  187. .I rx
  188. have the form
  189. .IB network ! machine\f1.
  190. Supported networks are those listed in
  191. .BR /net .
  192. .PP
  193. The commands
  194. .I xms
  195. and
  196. .I xmr
  197. respectively send and receive a single file using the
  198. XMODEM protocol.
  199. They use standard input and standard output for communication
  200. and are intended for use with
  201. .IR con .
  202. The
  203. .B -1
  204. option to
  205. .I xms
  206. causes it to use kilobyte packet size of 1024 bytes.
  207. The
  208. .B -p
  209. option causes it to print a progress
  210. message every ten kilobytes.
  211. .SH EXAMPLES
  212. .TP
  213. .L
  214. rx kremvax cat file1 >file2
  215. Copy remote
  216. .I file1
  217. to local
  218. .IR file2 .
  219. .TP
  220. .L
  221. rx kremvax cat file1 '>file2'
  222. Copy remote
  223. .I file1
  224. to remote
  225. .IR file2.
  226. .TP
  227. .L
  228. eqn paper | rx kremvax troff -ms | rx deepthought lp
  229. Parallel processing:
  230. do each stage of a pipeline on a different machine.
  231. .SH SOURCE
  232. .TF /sys/src/cmd/con
  233. .TP
  234. .B /sys/src/cmd/con
  235. for
  236. .IR con ,
  237. .IR xms ,
  238. and
  239. .IR xmr .
  240. .TP
  241. .B /sys/src/cmd/ip
  242. for
  243. .IR telnet .
  244. .SH BUGS
  245. Under
  246. .IR rx ,
  247. a program
  248. that should behave specially towards terminals may not: e.g.,
  249. remote shells will not prompt.
  250. Also under
  251. .IR rx ,
  252. the remote standard error and standard output are combined
  253. and go inseparably to the local standard output.