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