Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
a62ea421 | 2 | .\" All rights reserved. |
2057e373 | 3 | .\" |
263cc8fc | 4 | .\" %sccs.include.redist.roff% |
2057e373 | 5 | .\" |
263cc8fc | 6 | .\" @(#)tip.1 6.8 (Berkeley) %G% |
a62ea421 | 7 | .\" |
b5dc1377 CL |
8 | .Dd |
9 | .Dt TIP 1 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm tip , | |
13 | .Nm cu | |
14 | .Nd connect to a remote system | |
15 | .Sh SYNOPSIS | |
16 | .Nm tip | |
17 | .Op Fl v | |
263cc8fc | 18 | .Fl Ns Ns Ar speed |
b5dc1377 CL |
19 | .Ar system\-name |
20 | .Nm tip | |
21 | .Op Fl v | |
263cc8fc | 22 | .Fl Ns Ns Ar speed |
b5dc1377 CL |
23 | .Ar phone\-number |
24 | .Nm cu | |
25 | .Ar phone\-number | |
26 | .Op Fl t | |
27 | .Op Fl s Ar speed | |
28 | .Op Fl a Ar acu | |
29 | .Op Fl l Ar line | |
30 | .Op Fl # | |
31 | .Sh DESCRIPTION | |
32 | .Nm Tip | |
2057e373 | 33 | and |
b5dc1377 | 34 | .Ar cu |
2252a1c0 KM |
35 | establish a full-duplex connection to another machine, |
36 | giving the appearance of being logged in directly on the | |
37 | remote cpu. It goes without saying that you must have a login | |
38 | on the machine (or equivalent) to which you wish to connect. | |
39 | The preferred interface is | |
b5dc1377 | 40 | .Nm tip . |
2252a1c0 | 41 | The |
b5dc1377 | 42 | .Ar cu |
2252a1c0 | 43 | interface is included for those people attached to the |
263cc8fc CL |
44 | ``call |
45 | .Ux Ns '' | |
46 | command of version 7. This manual page | |
b5dc1377 CL |
47 | describes only |
48 | .Nm tip . | |
49 | .Pp | |
5325ced3 | 50 | Available Option: |
263cc8fc CL |
51 | .Bl -tag -width indent |
52 | .It Fl v | |
b5dc1377 | 53 | Set verbose mode. |
263cc8fc | 54 | .El |
b5dc1377 | 55 | .Pp |
2252a1c0 KM |
56 | Typed characters are normally transmitted directly to the remote |
57 | machine (which does the echoing as well). A tilde (`~') appearing | |
58 | as the first character of a line is an escape signal; the following | |
59 | are recognized: | |
263cc8fc CL |
60 | .Bl -tag -width flag |
61 | .It Ic \&~^D No or Ic \&~ . | |
2252a1c0 KM |
62 | Drop the connection and exit |
63 | (you may still be logged in on the | |
64 | remote machine). | |
263cc8fc | 65 | .It Ic \&~c Op Ar name |
5325ced3 CL |
66 | Change directory to |
67 | .Ar name | |
68 | (no argument | |
2252a1c0 | 69 | implies change to your home directory). |
263cc8fc | 70 | .It Ic \&~! |
2252a1c0 KM |
71 | Escape to a shell (exiting the shell will |
72 | return you to tip). | |
263cc8fc | 73 | .It Ic \&~> |
2252a1c0 | 74 | Copy file from local to remote. |
b5dc1377 | 75 | .Nm Tip |
2252a1c0 | 76 | prompts for the name of a local file to transmit. |
263cc8fc | 77 | .It Ic \&~< |
2252a1c0 | 78 | Copy file from remote to local. |
b5dc1377 | 79 | .Nm Tip |
2252a1c0 KM |
80 | prompts first for the name of the file to be sent, then for |
81 | a command to be executed on the remote machine. | |
263cc8fc CL |
82 | .It Ic \&~p Ar from Op Ar to |
83 | Send a file to a remote | |
84 | .Ux | |
85 | host. The put command causes the remote | |
86 | .Ux | |
2252a1c0 | 87 | system to run the command string ``cat > 'to''', while |
b5dc1377 | 88 | .Nm tip |
2252a1c0 KM |
89 | sends it the ``from'' |
90 | file. If the ``to'' file isn't specified the ``from'' file name is used. | |
263cc8fc CL |
91 | This command is actually a |
92 | .Ux | |
93 | specific version of the ``~>'' command. | |
94 | .It Ic \&~t Ar from Op Ar to | |
95 | Take a file from a remote | |
96 | .Ux | |
97 | host. | |
2252a1c0 | 98 | As in the put command the ``to'' file |
b5dc1377 | 99 | defaults to the ``from'' file name if it isn't specified. |
2252a1c0 KM |
100 | The remote host |
101 | executes the command string ``cat 'from';echo ^A'' to send the file to | |
b5dc1377 | 102 | .Nm tip . |
263cc8fc CL |
103 | .It Ic \&~ |
104 | Pipe the output from a remote command to a local | |
105 | .Ux | |
106 | process. | |
107 | The command string sent to the local | |
108 | .Ux | |
109 | system is processed by the shell. | |
110 | .It Ic \&~$ | |
111 | Pipe the output from a local | |
112 | .Ux | |
113 | process to the remote host. | |
114 | The command string sent to the local | |
115 | .Ux | |
116 | system is processed by the shell. | |
117 | .It Ic \&~# | |
118 | Send a | |
119 | .Dv BREAK | |
120 | to the remote system. | |
2252a1c0 KM |
121 | For systems which don't support the |
122 | necessary | |
b5dc1377 | 123 | .Ar ioctl |
2252a1c0 | 124 | call the break is simulated by a sequence of line speed changes |
263cc8fc CL |
125 | and |
126 | .Dv DEL | |
127 | characters. | |
128 | .It Ic \&~s | |
2252a1c0 | 129 | Set a variable (see the discussion below). |
263cc8fc | 130 | .It Ic \&~^Z |
2252a1c0 | 131 | Stop |
b5dc1377 | 132 | .Nm tip |
2252a1c0 | 133 | (only available with job control). |
263cc8fc | 134 | .It Ic \&~^Y |
c6f7764d | 135 | Stop only the ``local side'' of |
b5dc1377 | 136 | .Nm tip |
c6f7764d SL |
137 | (only available with job control); |
138 | the ``remote side'' of | |
b5dc1377 | 139 | .Nm tip , |
c6f7764d | 140 | the side that displays output from the remote host, is left running. |
263cc8fc | 141 | .It Ic \&~? |
2252a1c0 | 142 | Get a summary of the tilde escapes |
263cc8fc | 143 | .El |
b5dc1377 CL |
144 | .Pp |
145 | .Nm Tip | |
5325ced3 CL |
146 | uses the file |
147 | .Pa /etc/remote | |
148 | to find how to reach a particular | |
2252a1c0 KM |
149 | system and to find out how it should operate while talking |
150 | to the system; | |
151 | refer to | |
b5dc1377 | 152 | .Xr remote 5 |
2252a1c0 KM |
153 | for a full description. |
154 | Each system has a default baud rate with which to | |
155 | establish a connection. If this value is not suitable, the baud rate | |
263cc8fc CL |
156 | to be used may be specified on the command line, e.g. |
157 | .Ql "tip -300 mds" . | |
b5dc1377 | 158 | .Pp |
2252a1c0 | 159 | When |
b5dc1377 | 160 | .Nm tip |
2252a1c0 KM |
161 | establishes a connection it sends out a |
162 | connection message to the remote system; the default value, if any, | |
b5dc1377 | 163 | is defined in |
5325ced3 CL |
164 | .Pa /etc/remote |
165 | (see | |
b5dc1377 CL |
166 | .Xr remote 5 ) . |
167 | .Pp | |
2252a1c0 | 168 | When |
b5dc1377 | 169 | .Nm tip |
2252a1c0 KM |
170 | prompts for an argument (e.g. during setup of |
171 | a file transfer) the line typed may be edited with the standard | |
172 | erase and kill characters. A null line in response to a prompt, | |
173 | or an interrupt, will abort the dialogue and return you to the | |
174 | remote machine. | |
b5dc1377 CL |
175 | .Pp |
176 | .Nm Tip | |
2252a1c0 KM |
177 | guards against multiple users connecting to a remote system |
178 | by opening modems and terminal lines with exclusive access, | |
179 | and by honoring the locking protocol used by | |
b5dc1377 CL |
180 | .Xr uucp 1 . |
181 | .Pp | |
182 | During file transfers | |
183 | .Nm tip | |
2252a1c0 KM |
184 | provides a running count of the number of lines transferred. |
185 | When using the ~> and ~< commands, the ``eofread'' and ``eofwrite'' | |
186 | variables are used to recognize end-of-file when reading, and | |
187 | specify end-of-file when writing (see below). File transfers | |
188 | normally depend on tandem mode for flow control. If the remote | |
189 | system does not support tandem mode, ``echocheck'' may be set | |
190 | to indicate | |
b5dc1377 | 191 | .Nm tip |
2252a1c0 KM |
192 | should synchronize with the remote system on the echo of each |
193 | transmitted character. | |
b5dc1377 | 194 | .Pp |
2252a1c0 | 195 | When |
b5dc1377 | 196 | .Nm tip |
2252a1c0 KM |
197 | must dial a phone number to connect to a system it will print |
198 | various messages indicating its actions. | |
b5dc1377 | 199 | .Nm Tip |
263cc8fc CL |
200 | supports the |
201 | .Tn DEC DN Ns-11 | |
202 | and | |
203 | Racal-Vadic 831 auto-call-units; | |
204 | the | |
205 | .Tn DEC DF Ns \&02 | |
206 | and | |
207 | .Tn DF Ns \&03 , | |
208 | Ventel 212+, Racal-Vadic 3451, and | |
2252a1c0 | 209 | Bizcomp 1031 and 1032 integral call unit/modems. |
b5dc1377 CL |
210 | .Ss VARIABLES |
211 | .Nm Tip | |
2252a1c0 | 212 | maintains a set of |
b5dc1377 | 213 | .Ar variables |
2252a1c0 KM |
214 | which control its operation. |
215 | Some of these variable are read-only to normal users (root is allowed | |
216 | to change anything of interest). Variables may be displayed | |
217 | and set through the ``s'' escape. The syntax for variables is patterned | |
218 | after | |
b5dc1377 | 219 | .Xr vi 1 |
2057e373 | 220 | and |
b5dc1377 | 221 | .Xr Mail 1 . |
2252a1c0 KM |
222 | Supplying ``all'' |
223 | as an argument to the set command displays all variables readable by | |
224 | the user. Alternatively, the user may request display of a particular | |
225 | variable by attaching a `?' to the end. For example ``escape?'' | |
226 | displays the current escape character. | |
b5dc1377 | 227 | .Pp |
2252a1c0 KM |
228 | Variables are numeric, string, character, or boolean values. Boolean |
229 | variables are set merely by specifying their name; they may be reset | |
230 | by prepending a `!' to the name. Other variable types are set by | |
231 | concatenating an `=' and the value. The entire assignment must not | |
232 | have any blanks in it. A single set command may be used to interrogate | |
233 | as well as set a number of variables. | |
234 | Variables may be initialized at run time by placing set commands | |
235 | (without the ``~s'' prefix in a file | |
b5dc1377 | 236 | .Pa .tiprc |
2252a1c0 | 237 | in one's home directory). The |
b5dc1377 | 238 | .Fl v |
2252a1c0 | 239 | option causes |
b5dc1377 | 240 | .Nm tip |
2252a1c0 | 241 | to display the sets as they are made. |
b5dc1377 | 242 | Certain common variables have abbreviations. |
2252a1c0 KM |
243 | The following is a list of common variables, |
244 | their abbreviations, and their default values. | |
263cc8fc CL |
245 | .Bl -tag -width Ar |
246 | .It Ar beautify | |
2252a1c0 | 247 | (bool) Discard unprintable characters when a session is being scripted; |
b5dc1377 CL |
248 | abbreviated |
249 | .Ar be . | |
263cc8fc | 250 | .It Ar baudrate |
2252a1c0 KM |
251 | (num) The baud rate at which the connection was established; |
252 | abbreviated | |
b5dc1377 | 253 | .Ar ba . |
263cc8fc | 254 | .It Ar dialtimeout |
2252a1c0 KM |
255 | (num) When dialing a phone number, the time (in seconds) |
256 | to wait for a connection to be established; abbreviated | |
b5dc1377 | 257 | .Ar dial . |
263cc8fc | 258 | .It Ar echocheck |
2252a1c0 KM |
259 | (bool) Synchronize with the remote host during file transfer by |
260 | waiting for the echo of the last character transmitted; default is | |
b5dc1377 | 261 | .Ar off . |
263cc8fc | 262 | .It Ar eofread |
2252a1c0 KM |
263 | (str) The set of characters which signify and end-of-tranmission |
264 | during a ~< file transfer command; abbreviated | |
b5dc1377 | 265 | .Ar eofr . |
263cc8fc | 266 | .It Ar eofwrite |
2252a1c0 KM |
267 | (str) The string sent to indicate end-of-transmission during |
268 | a ~> file transfer command; abbreviated | |
b5dc1377 | 269 | .Ar eofw . |
263cc8fc | 270 | .It Ar eol |
2252a1c0 | 271 | (str) The set of characters which indicate an end-of-line. |
b5dc1377 | 272 | .Nm Tip |
2252a1c0 | 273 | will recognize escape characters only after an end-of-line. |
263cc8fc | 274 | .It Ar escape |
2252a1c0 | 275 | (char) The command prefix (escape) character; abbreviated |
b5dc1377 | 276 | .Ar es ; |
2252a1c0 | 277 | default value is `~'. |
263cc8fc | 278 | .It Ar exceptions |
2252a1c0 KM |
279 | (str) The set of characters which should not be discarded |
280 | due to the beautification switch; abbreviated | |
b5dc1377 | 281 | .Ar ex ; |
2252a1c0 | 282 | default value is ``\et\en\ef\eb''. |
263cc8fc | 283 | .It Ar force |
2252a1c0 KM |
284 | (char) The character used to force literal data transmission; |
285 | abbreviated | |
b5dc1377 | 286 | .Ar fo ; |
2252a1c0 | 287 | default value is `^P'. |
263cc8fc | 288 | .It Ar framesize |
2252a1c0 KM |
289 | (num) The amount of data (in bytes) to buffer between file system |
290 | writes when receiving files; abbreviated | |
b5dc1377 | 291 | .Ar fr . |
263cc8fc | 292 | .It Ar host |
2252a1c0 | 293 | (str) The name of the host to which you are connected; abbreviated |
b5dc1377 | 294 | .Ar ho . |
263cc8fc | 295 | .It Ar prompt |
2252a1c0 KM |
296 | (char) The character which indicates and end-of-line on the remote |
297 | host; abbreviated | |
b5dc1377 | 298 | .Ar pr ; |
2252a1c0 KM |
299 | default value is `\en'. This value is used to synchronize during |
300 | data transfers. The count of lines transferred during a file transfer | |
301 | command is based on recipt of this character. | |
263cc8fc | 302 | .It Ar raise |
b5dc1377 CL |
303 | (bool) Upper case mapping mode; abbreviated |
304 | .Ar ra ; | |
305 | default value is | |
306 | .Ar off . | |
2252a1c0 KM |
307 | When this mode is enabled, all lower case letters will be mapped to |
308 | upper case by | |
b5dc1377 | 309 | .Nm tip |
2252a1c0 | 310 | for transmission to the remote machine. |
263cc8fc | 311 | .It Ar raisechar |
2252a1c0 KM |
312 | (char) The input character used to toggle upper case mapping mode; |
313 | abbreviated | |
b5dc1377 | 314 | .Ar rc ; |
2252a1c0 | 315 | default value is `^A'. |
263cc8fc | 316 | .It Ar record |
2252a1c0 KM |
317 | (str) The name of the file in which a session script is recorded; |
318 | abbreviated | |
b5dc1377 | 319 | .Ar rec ; |
2252a1c0 | 320 | default value is ``tip.record''. |
263cc8fc | 321 | .It Ar script |
2252a1c0 | 322 | (bool) Session scripting mode; abbreviated |
b5dc1377 CL |
323 | .Ar sc ; |
324 | default is | |
325 | .Ar off . | |
2252a1c0 | 326 | When |
b5dc1377 CL |
327 | .Ar script |
328 | is | |
329 | .Li true , | |
330 | .Nm tip | |
2252a1c0 KM |
331 | will record everything transmitted by the remote machine in |
332 | the script record file specified in | |
b5dc1377 | 333 | .Ar record . |
2252a1c0 | 334 | If the |
b5dc1377 | 335 | .Ar beautify |
263cc8fc CL |
336 | switch is on, only printable |
337 | .Tn ASCII | |
338 | characters will be included in | |
2252a1c0 KM |
339 | the script file (those characters betwee 040 and 0177). The |
340 | variable | |
b5dc1377 | 341 | .Ar exceptions |
2252a1c0 KM |
342 | is used to indicate characters which are an exception to the normal |
343 | beautification rules. | |
263cc8fc | 344 | .It Ar tabexpand |
2252a1c0 | 345 | (bool) Expand tabs to spaces during file transfers; abbreviated |
b5dc1377 | 346 | .Ar tab ; |
2252a1c0 | 347 | default value is |
b5dc1377 | 348 | .Ar false . |
2252a1c0 | 349 | Each tab is expanded to 8 spaces. |
263cc8fc | 350 | .It Ar verbose |
2252a1c0 | 351 | (bool) Verbose mode; abbreviated |
b5dc1377 CL |
352 | .Ar verb ; |
353 | default is | |
354 | .Ar true . | |
355 | When verbose mode is enabled, | |
356 | .Nm tip | |
2252a1c0 KM |
357 | prints messages while dialing, shows the current number |
358 | of lines transferred during a file transfer operations, | |
359 | and more. | |
263cc8fc | 360 | .El |
b5dc1377 CL |
361 | .Sh ENVIRONMENT |
362 | .Nm Tip | |
5325ced3 | 363 | uses the following environment variables: |
263cc8fc CL |
364 | .Bl -tag -width Fl |
365 | .It Ev SHELL | |
2252a1c0 KM |
366 | (str) The name of the shell to use for the ~! command; default |
367 | value is ``/bin/sh'', or taken from the environment. | |
263cc8fc | 368 | .It Ev HOME |
2252a1c0 KM |
369 | (str) The home directory to use for the ~c command; default |
370 | value is taken from the environment. | |
263cc8fc | 371 | .It Ev HOST |
b5dc1377 | 372 | Check for a default host if none specified. |
263cc8fc | 373 | .El |
b5dc1377 CL |
374 | .Pp |
375 | The variables | |
376 | .Ev ${REMOTE} | |
377 | and | |
378 | .Ev ${PHONES} | |
379 | are also exported. | |
380 | .Sh FILES | |
263cc8fc CL |
381 | .Bl -tag -width /var/spool/uucp/LCK..* -compact |
382 | .It Pa /etc/remote | |
383 | Global system descriptions. | |
384 | .It Pa /etc/phones | |
385 | Global phone number data base. | |
386 | .It ${REMOTE} | |
387 | Private system descriptions. | |
388 | .It ${PHONES} | |
389 | Private phone numbers. | |
390 | .It ~/.tiprc | |
391 | Initialization file. | |
392 | .It Pa tip.record | |
393 | Record file. | |
394 | .It /var/log/aculog | |
395 | Line access log. | |
396 | .It Pa /var/spool/uucp/LCK..* | |
397 | Lock file to avoid conflicts with | |
398 | .Xr uucp . | |
399 | .El | |
b5dc1377 | 400 | .Sh DIAGNOSTICS |
2252a1c0 | 401 | Diagnostics are, hopefully, self explanatory. |
b5dc1377 CL |
402 | .Sh SEE ALSO |
403 | .Xr remote 5 , | |
404 | .Xr phones 5 | |
405 | .Sh HISTORY | |
263cc8fc CL |
406 | The |
407 | .Nm tip | |
408 | appeared command in | |
409 | .Bx 4.2 . | |
b5dc1377 | 410 | .Sh BUGS |
2252a1c0 KM |
411 | The full set of variables is undocumented and should, probably, be |
412 | paired down. |