[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.15

1.15    ! millert     1: .\"    $OpenBSD: tip.1,v 1.14 2001/08/11 00:05:53 krw 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: .\"
                     37: .Dd April 18, 1994
                     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
        !            50: .Ar phone\-number
        !            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).
                    213: .It Ic \&~^Z
                    214: Stop
1.6       aaron     215: .Nm
1.1       deraadt   216: (only available with job control).
                    217: .It Ic \&~^Y
1.6       aaron     218: Stop only the
                    219: .Dq local side
                    220: of
                    221: .Nm
1.14      krw       222: (only available with job control); the
1.6       aaron     223: .Dq remote side
                    224: of
1.4       aaron     225: .Nm tip ,
1.1       deraadt   226: the side that displays output from the remote host, is left running.
                    227: .It Ic \&~?
1.4       aaron     228: Get a summary of the tilde escapes.
1.1       deraadt   229: .El
                    230: .Pp
1.14      krw       231: To find the system description and thus the operating characteristics
                    232: of
                    233: .Ar system-name ,
1.6       aaron     234: .Nm
1.14      krw       235: searches for a system description with a name identical to
                    236: .Ar system-name .
                    237: The search order is
                    238: .Bl -enum -offset indent
                    239: .It
                    240: If the environment variable
                    241: .Ev REMOTE
                    242: does not start with a
                    243: .Ql \&/
                    244: it is assumed to be a system description, and is considered first.
                    245: .It
                    246: If the environment variable
                    247: .Ev REMOTE
                    248: begins with a
                    249: .Ql \&/
                    250: it is assumed to be a path to a
                    251: .Xr remote 5
                    252: database, and the specified database is searched.
                    253: .It
                    254: The default
1.7       aaron     255: .Xr remote 5
1.14      krw       256: database,
                    257: .Pa /etc/remote ,
                    258: is searched.
                    259: .El
                    260: .Pp
                    261: See
                    262: .Xr remote 5
                    263: for full documentation on system descriptions.
                    264: .Pp
                    265: The
                    266: .Ar ba
                    267: capability is used in system descriptions to specify the baud rate
                    268: with which to establish a connection.
                    269: If the value specified is not suitable, the baud rate to be used may
                    270: be given on the command line, e.g.,
1.1       deraadt   271: .Ql "tip -300 mds" .
                    272: .Pp
                    273: When
1.6       aaron     274: .Nm
1.14      krw       275: establishes a connection it sends out the connection message
                    276: specified in the
                    277: .Ar cm
                    278: capability of the system description being used.
1.1       deraadt   279: .Pp
                    280: When
1.6       aaron     281: .Nm
1.14      krw       282: prompts for an argument (e.g., during setup of a file transfer) the
                    283: line typed may be edited with the standard erase and kill characters.
                    284: A null line in response to a prompt, or an interrupt, will abort the
                    285: dialogue and return you to the remote machine.
1.1       deraadt   286: .Pp
1.6       aaron     287: .Nm
1.14      krw       288: guards against multiple users connecting to a remote system by opening
                    289: modems and terminal lines with exclusive access, and by honoring the
                    290: locking protocol used by
1.1       deraadt   291: .Xr uucico 8 .
                    292: .Pp
                    293: During file transfers
1.6       aaron     294: .Nm
1.1       deraadt   295: provides a running count of the number of lines transferred.
1.6       aaron     296: When using the
                    297: .Ic ~>
                    298: and
                    299: .Ic ~<
                    300: commands, the
                    301: .Dq eofread
                    302: and
                    303: .Dq eofwrite
1.14      krw       304: variables are used to recognize end-of-file when reading, and specify
                    305: end-of-file when writing (see below).
1.7       aaron     306: File transfers normally depend on tandem mode for flow control.
                    307: If the remote system does not support tandem mode,
1.6       aaron     308: .Dq echocheck
                    309: may be set to indicate
                    310: .Nm
1.1       deraadt   311: should synchronize with the remote system on the echo of each
                    312: transmitted character.
                    313: .Pp
                    314: When
1.6       aaron     315: .Nm
1.14      krw       316: must dial a phone number to connect to a system it will print various
                    317: messages indicating its actions.
1.6       aaron     318: .Nm
1.14      krw       319: supports a variety of auto-call units and modems with the
                    320: .Ar at
                    321: capability in system descriptions.
                    322: .Pp
                    323: Support for Ventel 212+        (ventel), Hayes AT-style (hayes),
                    324: USRobotics Courier (courier), Telebit T3000 (t3000) and
                    325: Racal-Vadic 831 (vadic) units is enabled by default.
                    326: .Pp
                    327: Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw]
                    328: (biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and
                    329: Racal-Vadic 3451 (v3451) units can be added by recompiling
                    330: .Xr tip 1
                    331: with the appropriate defines.
                    332: .Pp
                    333: Note that if support for both the Racal-Vadic 831 and 3451 is enabled
                    334: they are referred to as the v831 and v3451 respectively.
                    335: If only one of the two is supported, it is referred to as vadic.
1.1       deraadt   336: .Ss VARIABLES
1.6       aaron     337: .Nm
1.14      krw       338: maintains a set of variables which control its operation.
1.1       deraadt   339: Some of these variables are read-only to normal users (root is allowed
1.7       aaron     340: to change anything of interest).
                    341: Variables may be displayed and set through the
1.6       aaron     342: .Sq s
1.7       aaron     343: escape.
                    344: The syntax for variables is patterned after
1.6       aaron     345: .Xr vi 1
1.1       deraadt   346: and
1.6       aaron     347: .Xr Mail 1 .
                    348: Supplying
                    349: .Dq all
1.1       deraadt   350: as an argument to the set command displays all variables readable by
1.7       aaron     351: the user.
1.14      krw       352: Alternatively, the user may request display of a particular variable
                    353: by attaching a
1.6       aaron     354: .Ql ?
1.7       aaron     355: to the end.
                    356: For example,
1.6       aaron     357: .Dq escape?
1.1       deraadt   358: displays the current escape character.
                    359: .Pp
1.7       aaron     360: Variables are numeric, string, character, or boolean values.
1.14      krw       361: Boolean variables are set merely by specifying their name; they may be
                    362: reset by prepending a
1.6       aaron     363: .Ql !
1.7       aaron     364: to the name.
                    365: Other variable types are set by concatenating an
1.6       aaron     366: .Ql =
1.7       aaron     367: and the value.
                    368: The entire assignment must not have any blanks in it.
1.14      krw       369: A single set command may be used to interrogate as well as set a
                    370: number of variables.
1.1       deraadt   371: Variables may be initialized at run time by placing set commands
1.6       aaron     372: (without the
                    373: .Ql ~s
                    374: prefix in a file
1.1       deraadt   375: .Pa .tiprc
1.7       aaron     376: in one's home directory).
                    377: The
1.1       deraadt   378: .Fl v
                    379: option causes
1.6       aaron     380: .Nm
1.1       deraadt   381: to display the sets as they are made.
                    382: Certain common variables have abbreviations.
1.14      krw       383: The following is a list of common variables, their abbreviations, and
                    384: their default values:
1.1       deraadt   385: .Bl -tag -width Ar
                    386: .It Ar beautify
1.14      krw       387: (bool) Discard unprintable characters when a session is being
                    388: scripted; abbreviated
1.4       aaron     389: .Ar be .
1.1       deraadt   390: .It Ar baudrate
                    391: (num) The baud rate at which the connection was established;
                    392: abbreviated
1.4       aaron     393: .Ar ba .
1.1       deraadt   394: .It Ar dialtimeout
1.14      krw       395: (num) When dialing a phone number, the time (in seconds) to wait for a
                    396: connection to be established; abbreviated
1.4       aaron     397: .Ar dial .
1.1       deraadt   398: .It Ar echocheck
                    399: (bool) Synchronize with the remote host during file transfer by
                    400: waiting for the echo of the last character transmitted; default is
1.4       aaron     401: .Ar off .
1.1       deraadt   402: .It Ar eofread
                    403: (str) The set of characters which signify an end-of-transmission
1.6       aaron     404: during a
                    405: .Ic ~<
                    406: file transfer command; abbreviated
1.4       aaron     407: .Ar eofr .
1.1       deraadt   408: .It Ar eofwrite
1.6       aaron     409: (str) The string sent to indicate end-of-transmission during a
                    410: .Ic ~>
                    411: file transfer command; abbreviated
1.4       aaron     412: .Ar eofw .
1.1       deraadt   413: .It Ar eol
                    414: (str) The set of characters which indicate an end-of-line.
1.6       aaron     415: .Nm
1.1       deraadt   416: will recognize escape characters only after an end-of-line.
                    417: .It Ar escape
                    418: (char) The command prefix (escape) character; abbreviated
1.6       aaron     419: .Ar es ;
                    420: default value is
                    421: .Ql ~ .
1.1       deraadt   422: .It Ar exceptions
1.14      krw       423: (str) The set of characters which should not be discarded due to the
                    424: beautification switch; abbreviated
1.7       aaron     425: .Ar ex ;
1.6       aaron     426: default value is
                    427: .Dq \et\en\ef\eb .
1.1       deraadt   428: .It Ar force
                    429: (char) The character used to force literal data transmission;
                    430: abbreviated
1.7       aaron     431: .Ar fo ;
1.6       aaron     432: default value is
                    433: .Ql ^P .
1.1       deraadt   434: .It Ar framesize
1.11      millert   435: (num) The amount of data (in bytes) to buffer between filesystem
1.1       deraadt   436: writes when receiving files; abbreviated
1.4       aaron     437: .Ar fr .
1.1       deraadt   438: .It Ar host
                    439: (str) The name of the host to which you are connected; abbreviated
1.4       aaron     440: .Ar ho .
1.1       deraadt   441: .It Ar prompt
                    442: (char) The character which indicates an end-of-line on the remote
                    443: host; abbreviated
1.6       aaron     444: .Ar pr ;
                    445: default value is
                    446: .Ql \en .
1.7       aaron     447: This value is used to synchronize during data transfers.
1.14      krw       448: The count of lines transferred during a file transfer command is based
                    449: on receipt of this character.
1.1       deraadt   450: .It Ar raise
                    451: (bool) Upper case mapping mode; abbreviated
1.6       aaron     452: .Ar ra ;
1.1       deraadt   453: default value is
1.4       aaron     454: .Ar off .
1.11      millert   455: When this mode is enabled, all lowercase letters will be mapped to
                    456: uppercase by
1.6       aaron     457: .Nm
1.1       deraadt   458: for transmission to the remote machine.
                    459: .It Ar raisechar
1.11      millert   460: (char) The input character used to toggle uppercase mapping mode;
1.1       deraadt   461: abbreviated
1.6       aaron     462: .Ar rc ;
                    463: default value is
                    464: .Ql ^A .
1.1       deraadt   465: .It Ar record
                    466: (str) The name of the file in which a session script is recorded;
                    467: abbreviated
1.6       aaron     468: .Ar rec ;
                    469: default value is
                    470: .Dq tip.record .
1.1       deraadt   471: .It Ar script
                    472: (bool) Session scripting mode; abbreviated
1.7       aaron     473: .Ar sc ;
1.1       deraadt   474: default is
1.4       aaron     475: .Ar off .
1.1       deraadt   476: When
                    477: .Ar script
                    478: is
1.8       aaron     479: .Li true ,
1.6       aaron     480: .Nm
1.14      krw       481: will record everything transmitted by the remote machine in the script
                    482: record file specified in
1.4       aaron     483: .Ar record .
1.1       deraadt   484: If the
                    485: .Ar beautify
                    486: switch is on, only printable
                    487: .Tn ASCII
1.14      krw       488: characters will be included in the script file (those characters
                    489: between 040 and 0177).
1.7       aaron     490: The variable
1.1       deraadt   491: .Ar exceptions
                    492: is used to indicate characters which are an exception to the normal
                    493: beautification rules.
                    494: .It Ar tabexpand
                    495: (bool) Expand tabs to spaces during file transfers; abbreviated
1.7       aaron     496: .Ar tab ;
1.1       deraadt   497: default value is
1.4       aaron     498: .Ar false .
1.1       deraadt   499: Each tab is expanded to 8 spaces.
                    500: .It Ar verbose
                    501: (bool) Verbose mode; abbreviated
1.7       aaron     502: .Ar verb ;
1.1       deraadt   503: default is
1.4       aaron     504: .Ar true .
1.1       deraadt   505: When verbose mode is enabled,
1.6       aaron     506: .Nm
1.14      krw       507: prints messages while dialing, shows the current number of lines
                    508: transferred during a file transfer operations, and more.
1.1       deraadt   509: .El
                    510: .Sh ENVIRONMENT
                    511: .Bl -tag -width Fl
                    512: .It Ev SHELL
1.14      krw       513: The name of the shell to use for the
1.6       aaron     514: .Ic ~!
                    515: command; default value is
1.14      krw       516: .Dq /bin/sh .
1.1       deraadt   517: .It Ev HOME
1.14      krw       518: The home directory to use for the
1.6       aaron     519: .Ic ~c
1.14      krw       520: command.
1.1       deraadt   521: .It Ev HOST
1.14      krw       522: The default value for
                    523: .Ar system-name
                    524: if none is specified via the command line.
                    525: .It Ev REMOTE
                    526: A system description, or an absolute path to a
                    527: .Xr remote 5
                    528: system description database.
                    529: .It Ev PHONES
                    530: A path to a
                    531: .Xr phones 5
                    532: database.
1.1       deraadt   533: .El
                    534: .Sh FILES
1.14      krw       535: .Bl -tag -width "/var/spool/lock/LCK..*" -compact
1.1       deraadt   536: .It Pa /etc/remote
1.14      krw       537: global
                    538: .Xr remote 5
                    539: database
1.1       deraadt   540: .It Pa /etc/phones
1.14      krw       541: default
                    542: .Xr phones 5
                    543: file
1.4       aaron     544: .It Pa ~/.tiprc
                    545: initialization file
1.1       deraadt   546: .It Pa tip.record
1.4       aaron     547: record file
                    548: .It Pa /var/log/aculog
                    549: line access log
1.1       deraadt   550: .It Pa /var/spool/lock/LCK..*
1.4       aaron     551: lock file to avoid conflicts with
                    552: .Xr uucp
1.1       deraadt   553: .El
                    554: .Sh SEE ALSO
1.4       aaron     555: .Xr phones 5 ,
                    556: .Xr remote 5
1.1       deraadt   557: .Sh HISTORY
                    558: The
1.6       aaron     559: .Nm
1.1       deraadt   560: appeared command in
                    561: .Bx 4.2 .
                    562: .Sh BUGS
                    563: The full set of variables is undocumented and should, probably, be
                    564: pared down.