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

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