Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cu(1) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

ct(1)

echo(1)

stty(1)

uucp(1)

uname(1)

uuname(1)



cu(1)                            DG/UX 5.4.2                           cu(1)


NAME
       cu - call another UNIX system

SYNOPSIS
       cu [ options ] [ destination ]

DESCRIPTION
       cu calls up another UNIX system, a terminal, or possibly a non-UNIX
       system.  It manages an interactive conversation with possible
       transfers of files.  It is convenient to think of cu as operating in
       two phases.  The first phase is the connection phase in which the
       connection is established.  cu then enters the conversation phase.
       The -d option is the only one that applies to both phases.

       -d          Causes diagnostic traces to be printed.

   Connection Phase
       cu uses the same mechanism that uucp does to establish a connection.
       This means that it will use the uucp control files /etc/uucp/Devices
       and /etc/uucp/Systems.  This gives cu the ability to choose from
       several different media to establish the connection.  The Devices
       file contains a list of media that are available on your system.  The
       Systems file contains information for connecting to remote systems,
       but it is not generally readable.

       The destination parameter from the command line is used to tell cu
       what system you wish to connect to.  destination can be blank, a
       telephone number, or a system name.  A telephone number is a string
       consisting of the tone dial characters (the digits 0 through 9, *,
       and #) plus the special characters = and -.  The equal sign
       designates a secondary dial tone and the minus sign creates a 4
       second delay.  A system name is the name of any computer that uucp
       can call; the uuname command prints a list of these names.

       If cu's default behavior is invoked (not using the -c or -l options),
       cu will use destination to determine which medium to use.  If
       destination is a telephone number, cu will assume that you wish to
       use a telephone line and it will select an automatic call unit (ACU).
       If the destination is not a telephone number, then cu will assume
       that it is a system name.  cu will follow the uucp calling mechanism
       and use the Systems and Devices files to obtain the best available
       connection.  Since cu will choose a speed that is appropriate for the
       medium that it selects, you may not use the -s option when
       destination is a system name.

       The -c and -l options modify this default behavior.  Here,
       destination is assumed to be a system name.  The -l option is used to
       specify a device associated with a direct connection.  If the
       connection is truly a direct connection to the remote machine, then
       there is no need to specify a destination.  This is the only case
       where a blank destination is allowed.  On the other hand, there may
       be cases in which the specified device connects to a dialer, so it is
       valid to specify a telephone number as a destination.  The -c and -l
       options should not be specified on the same command line.



Licensed material--property of copyright holder(s)                         1




cu(1)                            DG/UX 5.4.2                           cu(1)


       cu accepts many options.  The -c, -l, and -s options play a part in
       selecting the medium; the remaining options are used in configuring
       the line.

       -sspeed     Specifies the transmission speed (300, 1200, 2400, 4800,
                   9600).  The default value is "Any" speed which will
                   depend on the order of the lines in the /etc/uucp/Devices
                   file.

       -ctype      The first field in the Devices file is the "Type" field.
                   The -c option forces cu to only use entries in the "Type"
                   field that match the user specified type.

       -lline      Specifies a device name to use as the communication line.
                   This can be used to override the search that would
                   otherwise take place for the first available line having
                   the right speed.  When the -l option is used without the
                   -s option, the speed of a line is taken from the Devices
                   file record in which line matches the second field (the
                   Line field).  When the -l and -s options are both used
                   together, cu will search the Devices file to check if the
                   requested speed for the requested line is available.  If
                   so, the connection will be made at the requested speed,
                   otherwise, an error message will be printed and the call
                   will not be made.  In the general case where a specified
                   device is a directly connected asynchronous line (e.g.,
                   /dev/ttyab), a telephone number (telno) is not required.
                   The specified device need not be in the /dev directory.
                   If the specified device is associated with an auto
                   dialer, a telephone number must be provided.  If
                   destination is used with this option, it must be a
                   telephone number.

       -bn         Forces n to be the number of bits processed on the line.
                   n is either 7 or 8.  This allows connection between
                   systems with different character sizes.  By default, the
                   character size of the line is set to the same as the
                   current local terminal.

       -e          Set an EVEN data parity.  This option designates that
                   EVEN parity is to be generated for data sent to the
                   remote system.

       -h          Set communication mode to half-duplex.  This option
                   emulates the local echo(1) command in order to support
                   calls to other computer systems that expect terminals to
                   be set to half-duplex mode.

       -n          Request user prompt for telephone number.  For added
                   security, this option will prompt the user to provide the
                   telephone number to be dialed, rather than taking it from
                   the command line.

       -o          Set an ODD data parity.  This option designates that ODD



Licensed material--property of copyright holder(s)                         2




cu(1)                            DG/UX 5.4.2                           cu(1)


                   parity is to be generated for data sent to the remote
                   system.

       -t          Used to dial a terminal which has been set to auto
                   answer.  Appropriate mapping of carriage-return to
                   carriage-return-line-feed pairs is set.


   Conversation Phase
       After making the connection, cu runs as two processes: the transmit
       process reads data from the standard input and, except for lines
       beginning with ~, passes it to the remote system; the receive process
       accepts data from the remote system and, except for lines beginning
       with ~, passes it to the standard output.  Normally, an automatic
       DC3/DC1 protocol is used to control input from the remote so the
       buffer is not overrun.  Lines beginning with ~ have special meanings.

       The transmit process interprets the following user initiated
       commands:

       ~.                  terminate the conversation.

       ~!                  escape to an interactive shell on the local
                           system.

       ~!cmd...            run cmd on the local system (via sh -c).

       ~$cmd...            run cmd locally and send its output to the remote
                           system.

       ~%cd                change the directory on the local system.  Note:
                           ~!cd will cause the command to be run by a sub-
                           shell, probably not what was intended.

       ~%take from [ to ]  copy file from (on the remote system) to file to
                           on the local system.  If to is omitted, the from
                           argument is used in both places.

       ~%put from [ to ]   copy file from (on local system) to file to on
                           remote system.  If to is omitted, the from
                           argument is used in both places.

       ~~ line             send the line ~ line to the remote system.

       ~%break             transmit a BREAK to the remote system (which can
                           also be specified as ~%b).

       ~%debug             toggles the -d debugging option on or off (which
                           can also be specified as ~%d).

       ~t                  prints the values of the termio structure
                           variables for the user's terminal (useful for
                           debugging).




Licensed material--property of copyright holder(s)                         3




cu(1)                            DG/UX 5.4.2                           cu(1)


       ~l                  prints the values of the termio structure
                           variables for the remote communication line
                           (useful for debugging).

       ~%ifc               toggles between DC3/DC1 input control protocol
                           and no input control.  This is useful when the
                           remote system does not respond properly to the
                           DC3 and DC1 characters.  (can also be specified
                           as ~%nostop).

       ~%ofc               toggles the output flow control setting.  When
                           enabled, outgoing data may be flow controlled by
                           the remote host (can also be specified as
                           ~%noostop).

       ~%divert            allow/disallow unsolicited diversions.  That is,
                           diversions not specified by ~%take.

       ~%old               allow/disallow old style syntax for received
                           diversions.

       The receive process normally copies data from the remote system to
       the standard output of the local system.  It may also direct the
       output to local files.

       The use of ~%put requires stty(1) and cat(1) on the remote side.  It
       also requires that the current erase and kill characters on the
       remote system be identical to these current control characters on the
       local system.  Backslashes are inserted at appropriate places.

       The use of ~%take requires the existence of echo(1) and cat(1) on the
       remote system.  Also, tabs mode (See stty(1)) should be set on the
       remote system if tabs are to be copied without expansion to spaces.

       When cu is used on system X to connect to system Y and subsequently
       used on system Y to connect to system Z, commands on system Y can be
       executed by using ~~. Executing a tilde command reminds the user of
       the local system uname.  For example, uname can be executed on Z, X,
       and Y as follows:

              uname -n
              Z
              ~[X]!uname -n
              X
              ~~[Y]!uname -n
              Y

       In general, ~ causes the command to be executed on the original
       machine.  ~~ causes the command to be executed on the next machine in
       the chain.

   International Features
       cu sets the input and output conversion mode to on or off, as
       appropriate, to avoide a character conversion on LOCAL system when



Licensed material--property of copyright holder(s)                         4




cu(1)                            DG/UX 5.4.2                           cu(1)


       accessing the REMOTE system.

       On the REMOTE system, the input and output conversion should be set
       manually, as cu cannot know whether input conversion is required or
       not.  In most cases, REMOTE systems can be used with input conversion
       on, however when transfering files, this should be set to off before
       invoking the file transfer command in order to avoid unexpected
       conversion of the file contents.

EXAMPLES
       To dial a system whose telephone number is 9 1 201 555 1234 using
       1200 baud (where dialtone is expected after the 9):

              cu  -s1200   9=12015551234

       If the speed is not specified, "Any" is the default value.

       To login to a system connected by a direct line:

              cu  -l  /dev/ttyXX

       or
              cu -l ttyXX

       To dial a system with a specific line and speed:

              cu  -s1200  -l  ttyXX

       To use a system name:
              cu  systemname

FILES
       /etc/uucp/Sysfiles
       /etc/uucp/Systems
       /etc/uucp/Devices
       /var/spool/locks/*
       /usr/spool/locks/LK.<MAJ>.<maj>.<min>
       Where <MAJ> is the major device of the filesystem containing the
       device, and <maj> and <min> are the major and minor of the device.

SEE ALSO
       cat(1), ct(1), echo(1), stty(1), uucp(1), uname(1), uuname(1).
       Customizing the DG/UX System, Managing the DG/UX System.

DIAGNOSTICS
       Exit code is zero for normal exit, otherwise, one.

       The cu program uses the same calling mechanism as uucico and several
       other automated uucp programs.  This mechanism enforces a waiting
       period between unsuccessful calls, to prevent uucp programs from
       attempting to call a busy host too frequently.

       The first time cu fails to connect, the waiting period is 300
       seconds.  With each subsequent failure, the waiting period is



Licensed material--property of copyright holder(s)                         5




cu(1)                            DG/UX 5.4.2                           cu(1)


       doubled.

       If you encounter a failure to connect with cu, you can either wait
       for the waiting period to expire, or delete the file
       /usr/spool/uucp/.Status/hostname, where hostname is the name of the
       host you were unable to connect with.

NOTES
       The cu command does not do any integrity checking on data it
       transfers.  Data fields with special cu characters may not be
       transmitted properly.  Depending on the interconnection hardware, it
       may be necessary to use a ~.  to terminate the conversion, even if
       stty 0 has been used.  Non-printing characters are not dependably
       transmitted using either the ~%put or ~%take commands.  cu, between
       an IMBR1 and a PENRIL modem, will not return a login prompt
       immediately upon connection.  A carriage return will return the
       prompt.

        %put and  %take cannot be used over multiple links.  Files must be
       moved one link at a time.

       There is an artificial slowing of transmission by cu during the ~%put
       operation so that loss of data is unlikely.  Files transferred using
       ~%take or ~%put must contain a trailing newline, otherwise, the
       operation will hang.  Entering a CTRL-d command usually clears the
       hang condition.































Licensed material--property of copyright holder(s)                         6


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026