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