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