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