[BACK]Return to tip.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / tip

Annotation of src/usr.bin/tip/tip.1, Revision 1.16

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