NetBSD/usr.bin/tip/tip.1

454 lines
13 KiB
Groff
Raw Normal View History

.\" $NetBSD: tip.1,v 1.10 1999/03/22 18:16:44 garbled Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
1993-03-21 12:45:37 +03:00
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)tip.1 8.4 (Berkeley) 4/18/94
1993-03-21 12:45:37 +03:00
.\"
.Dd April 18, 1994
1993-03-21 12:45:37 +03:00
.Dt TIP 1
.Os
1993-03-21 12:45:37 +03:00
.Sh NAME
.Nm tip
.\" .Nm cu
1993-03-21 12:45:37 +03:00
.Nd connect to a remote system
.Sh SYNOPSIS
.Nm
1993-03-21 12:45:37 +03:00
.Op Fl v
.Fl Ns Ns Ar speed
.Ar system\-name
.Nm ""
1993-03-21 12:45:37 +03:00
.Op Fl v
.Fl Ns Ns Ar speed
.Ar phone\-number
.\" .Nm cu
.\" .Ar phone\-number
.\" .Op Fl t
.\" .Op Fl s Ar speed
.\" .Op Fl a Ar acu
.\" .Op Fl l Ar line
.\" .Op Fl #
1993-03-21 12:45:37 +03:00
.Sh DESCRIPTION
.Nm
.\" and
.\" .Nm cu
1993-03-21 12:45:37 +03:00
establish a full-duplex connection to another machine,
giving the appearance of being logged in directly on the
remote cpu. It goes without saying that you must have a login
on the machine (or equivalent) to which you wish to connect.
.\" The preferred interface is
.\" .Nm tip .
.\" The
.\" .Nm cu
.\" interface is included for those people attached to the
.\" ``call
.\" .Ux Ns ''
.\" command of version 7. This manual page
.\" describes only
.\" .Nm tip .
1993-03-21 12:45:37 +03:00
.Pp
Available Option:
.Bl -tag -width indent
.It Fl v
Set verbose mode.
.El
.Pp
Typed characters are normally transmitted directly to the remote
machine (which does the echoing as well). A tilde (`~') appearing
as the first character of a line is an escape signal; the following
are recognized:
.Bl -tag -width flag
.It Ic \&~^D No or Ic \&~ .
Drop the connection and exit
(you may still be logged in on the
remote machine).
.It Ic \&~c Op Ar name
Change directory to
.Ar name
(no argument
implies change to your home directory).
.It Ic \&~!
Escape to a shell (exiting the shell will
return you to tip).
.It Ic \&~>
Copy file from local to remote.
.Nm
1993-03-21 12:45:37 +03:00
prompts for the name of a local file to transmit.
.It Ic \&~<
Copy file from remote to local.
.Nm
1993-03-21 12:45:37 +03:00
prompts first for the name of the file to be sent, then for
a command to be executed on the remote machine.
.It Ic \&~p Ar from Op Ar to
Send a file to a remote
.Ux
host. The put command causes the remote
.Ux
system to run the command string ``cat > 'to''', while
.Nm
1993-03-21 12:45:37 +03:00
sends it the ``from''
file. If the ``to'' file isn't specified the ``from'' file name is used.
This command is actually a
.Ux
specific version of the ``~>'' command.
.It Ic \&~t Ar from Op Ar to
Take a file from a remote
.Ux
host.
As in the put command the ``to'' file
defaults to the ``from'' file name if it isn't specified.
The remote host
executes the command string ``cat 'from';echo ^A'' to send the file to
.Nm "" .
.It Ic \&~|
1993-03-21 12:45:37 +03:00
Pipe the output from a remote command to a local
.Ux
process.
The command string sent to the local
.Ux
system is processed by the shell.
.It Ic \&~$
Pipe the output from a local
.Ux
process to the remote host.
The command string sent to the local
.Ux
system is processed by the shell.
.It Ic \&~C
Fork a child process on the local system to perform special protocols
such as \s-1XMODEM\s+1. The child program will be run with the following
somewhat unusual arrangement of file descriptors:
.nf
.in +1i
0 <-> local tty in
1 <-> local tty out
2 <-> local tty out
3 <-> remote tty in
4 <-> remote tty out
.in -1i
.fi
1993-03-21 12:45:37 +03:00
.It Ic \&~#
Send a
.Dv BREAK
to the remote system.
For systems which don't support the
necessary
.Ar ioctl
call the break is simulated by a sequence of line speed changes
and
.Dv DEL
characters.
.It Ic \&~s
Set a variable (see the discussion below).
.It Ic \&~^Z
Stop
.Nm
1993-03-21 12:45:37 +03:00
(only available with job control).
.It Ic \&~^Y
Stop only the ``local side'' of
.Nm
1993-03-21 12:45:37 +03:00
(only available with job control);
the ``remote side'' of
.Nm "" ,
1993-03-21 12:45:37 +03:00
the side that displays output from the remote host, is left running.
.It Ic \&~?
Get a summary of the tilde escapes
.El
.Pp
.Nm
1993-03-21 12:45:37 +03:00
uses the file
.Pa /etc/remote
to find how to reach a particular
system and to find out how it should operate while talking
to the system;
refer to
.Xr remote 5
for a full description.
Each system has a default baud rate with which to
establish a connection. If this value is not suitable, the baud rate
to be used may be specified on the command line, e.g.
.Ql "tip -300 mds" .
.Pp
When
.Nm
1993-03-21 12:45:37 +03:00
establishes a connection it sends out a
connection message to the remote system; the default value, if any,
is defined in
.Pa /etc/remote
(see
.Xr remote 5 ) .
.Pp
When
.Nm
1993-03-21 12:45:37 +03:00
prompts for an argument (e.g. during setup of
a file transfer) the line typed may be edited with the standard
erase and kill characters. A null line in response to a prompt,
or an interrupt, will abort the dialogue and return you to the
remote machine.
.Pp
.Nm
1993-03-21 12:45:37 +03:00
guards against multiple users connecting to a remote system
by opening modems and terminal lines with exclusive access,
and by honoring the locking protocol used by
.Xr uucico 8 .
1993-03-21 12:45:37 +03:00
.Pp
During file transfers
.Nm
1993-03-21 12:45:37 +03:00
provides a running count of the number of lines transferred.
When using the ~> and ~< commands, the ``eofread'' and ``eofwrite''
variables are used to recognize end-of-file when reading, and
specify end-of-file when writing (see below). File transfers
normally depend on tandem mode for flow control. If the remote
system does not support tandem mode, ``echocheck'' may be set
to indicate
.Nm
1993-03-21 12:45:37 +03:00
should synchronize with the remote system on the echo of each
transmitted character.
.Pp
When
.Nm
1993-03-21 12:45:37 +03:00
must dial a phone number to connect to a system it will print
various messages indicating its actions.
.Nm
1993-03-21 12:45:37 +03:00
supports the
.Tn DEC DN Ns-11
and
Racal-Vadic 831 auto-call-units;
the
.Tn DEC DF Ns \&02
and
.Tn DF Ns \&03 ,
Ventel 212+, Racal-Vadic 3451, and
Bizcomp 1031 and 1032 integral call unit/modems.
.Ss VARIABLES
.Nm
1993-03-21 12:45:37 +03:00
maintains a set of
.Ar variables
which control its operation.
Some of these variables are read-only to normal users (root is allowed
1993-03-21 12:45:37 +03:00
to change anything of interest). Variables may be displayed
and set through the ``s'' escape. The syntax for variables is patterned
after
.Xr vi 1
and
.Xr Mail 1 .
Supplying ``all''
as an argument to the set command displays all variables readable by
the user. Alternatively, the user may request display of a particular
1999-03-06 14:51:48 +03:00
variable by attaching a `?' to the end. For example ``escape?'' displays
the current escape character.
1993-03-21 12:45:37 +03:00
.Pp
Variables are numeric, string, character, or boolean values. Boolean
variables are set merely by specifying their name; they may be reset
by prepending a `!' to the name. Other variable types are set by
concatenating an `=' and the value. The entire assignment must not
have any blanks in it. A single set command may be used to interrogate
as well as set a number of variables.
Variables may be initialized at run time by placing set commands
(without the ``~s'' prefix in a file
.Pa .tiprc
in one's home directory). The
.Fl v
option causes
.Nm
1993-03-21 12:45:37 +03:00
to display the sets as they are made.
Certain common variables have abbreviations.
The following is a list of common variables,
their abbreviations, and their default values.
.Bl -tag -width Ar
.It Ar beautify
(bool) Discard unprintable characters when a session is being scripted;
abbreviated
.Ar be .
.It Ar baudrate
(num) The baud rate at which the connection was established;
abbreviated
.Ar ba .
.It Ar dialtimeout
(num) When dialing a phone number, the time (in seconds)
to wait for a connection to be established; abbreviated
.Ar dial .
.It Ar echocheck
(bool) Synchronize with the remote host during file transfer by
waiting for the echo of the last character transmitted; default is
.Ar off .
.It Ar eofread
(str) The set of characters which signify an end-of-transmission
1993-03-21 12:45:37 +03:00
during a ~< file transfer command; abbreviated
.Ar eofr .
.It Ar eofwrite
(str) The string sent to indicate end-of-transmission during
a ~> file transfer command; abbreviated
.Ar eofw .
.It Ar eol
(str) The set of characters which indicate an end-of-line.
.Nm
1993-03-21 12:45:37 +03:00
will recognize escape characters only after an end-of-line.
.It Ar escape
(char) The command prefix (escape) character; abbreviated
.Ar es ;
default value is `~'.
.It Ar exceptions
(str) The set of characters which should not be discarded
due to the beautification switch; abbreviated
.Ar ex ;
default value is ``\et\en\ef\eb''.
.It Ar force
(char) The character used to force literal data transmission;
abbreviated
.Ar fo ;
default value is `^P'.
.It Ar framesize
(num) The amount of data (in bytes) to buffer between file system
writes when receiving files; abbreviated
.Ar fr .
.It Ar host
(str) The name of the host to which you are connected; abbreviated
.Ar ho .
.It Ar prompt
(char) The character which indicates an end-of-line on the remote
1993-03-21 12:45:37 +03:00
host; abbreviated
.Ar pr ;
default value is `\en'. This value is used to synchronize during
data transfers. The count of lines transferred during a file transfer
1994-01-11 21:49:16 +03:00
command is based on receipt of this character.
1993-03-21 12:45:37 +03:00
.It Ar raise
(bool) Upper case mapping mode; abbreviated
.Ar ra ;
default value is
.Ar off .
When this mode is enabled, all lower case letters will be mapped to
upper case by
.Nm
1993-03-21 12:45:37 +03:00
for transmission to the remote machine.
.It Ar raisechar
(char) The input character used to toggle upper case mapping mode;
abbreviated
.Ar rc ;
default value is `^A'.
.It Ar record
(str) The name of the file in which a session script is recorded;
abbreviated
.Ar rec ;
default value is ``tip.record''.
.It Ar script
(bool) Session scripting mode; abbreviated
.Ar sc ;
default is
.Ar off .
When
.Ar script
is
.Li true ,
.Nm
1993-03-21 12:45:37 +03:00
will record everything transmitted by the remote machine in
the script record file specified in
.Ar record .
If the
.Ar beautify
switch is on, only printable
.Tn ASCII
characters will be included in
1994-01-11 21:49:16 +03:00
the script file (those characters between 040 and 0177). The
1993-03-21 12:45:37 +03:00
variable
.Ar exceptions
is used to indicate characters which are an exception to the normal
beautification rules.
.It Ar tabexpand
(bool) Expand tabs to spaces during file transfers; abbreviated
.Ar tab ;
default value is
.Ar false .
Each tab is expanded to 8 spaces.
.It Ar verbose
(bool) Verbose mode; abbreviated
.Ar verb ;
default is
.Ar true .
When verbose mode is enabled,
.Nm
1993-03-21 12:45:37 +03:00
prints messages while dialing, shows the current number
of lines transferred during a file transfer operations,
and more.
.El
.Sh ENVIRONMENT
.Nm
1993-03-21 12:45:37 +03:00
uses the following environment variables:
.Bl -tag -width Fl
.It Ev SHELL
(str) The name of the shell to use for the ~! command; default
value is ``/bin/sh'', or taken from the environment.
.It Ev HOME
(str) The home directory to use for the ~c command; default
value is taken from the environment.
.It Ev HOST
Check for a default host if none specified.
.El
.Pp
The variables
.Ev ${REMOTE}
and
.Ev ${PHONES}
are also exported.
.Sh FILES
1994-09-19 16:26:18 +04:00
.Bl -tag -width /var/spool/lock/LCK..* -compact
1993-03-21 12:45:37 +03:00
.It Pa /etc/remote
Global system descriptions.
.It Pa /etc/phones
Global phone number data base.
.It ${REMOTE}
Private system descriptions.
.It ${PHONES}
Private phone numbers.
.It ~/.tiprc
Initialization file.
.It Pa tip.record
Record file.
.It /var/log/aculog
Line access log.
1994-09-19 16:26:18 +04:00
.It Pa /var/spool/lock/LCK..*
1993-03-21 12:45:37 +03:00
Lock file to avoid conflicts with
.Xr uucp .
.El
.Sh DIAGNOSTICS
Diagnostics are, hopefully, self explanatory.
.Sh SEE ALSO
.Xr remote 5 ,
.Xr phones 5
.Sh HISTORY
The
.Nm
1993-03-21 12:45:37 +03:00
appeared command in
.Bx 4.2 .
.Sh BUGS
The full set of variables is undocumented and should, probably, be
pared down.