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