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