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

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