Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cu(1) — Reliant UNIX 5.44c4

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)                                                                 cu(1)

NAME
     cu - call another UNIX system

SYNOPSIS
     cu [option ...] [destination]

DESCRIPTION
     cu sets up a connection to another UNIX system or a non-UNIX system.
     The command operates in two phases: the first phase is the connection
     phase, in which the connection is established; the second phase is the
     conversation phase, in which data is transferred to and from the
     remote system.

   Connection phase

     cu [-sbaud] [-ctype] [-lline] [-bn] [-dehnot]

     cu uses the same mechanism as uucp to establish a connection. This
     means that it uses the uucp control files /etc/uucp/Devices,
     /etc/uucp/Systems and /etc/uucp/Dialers. This allows cu to choose from
     several different media to establish the connection. The possible
     media include telephone lines, direct connections, and local area net-
     works (LANs). /etc/uucp/Devices contains a list of media that are
     available on your system. /etc/uucp/Systems contains information for
     connecting to remote systems, but for security reason it is not gen-
     erally readable.

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

OPTIONS
     -sbaud
          Specifies the transmission speed in baud. The possible values are
          300, 1200, 2400, 4800, 9600 19200 and 38400. The default value
          depends on the order of the entries in /etc/uucp/Devices. Most
          modems use 2400, 4800 or 9600 baud.

     -ctype
          The first field in /etc/uucp/Devices is the "Type" field. The -c
          option forces cu to only use entries in the "Type" field that
          match type. type is usually the name of a local area network
          (LAN).

          If type is the name of a LAN, cu assumes destination to be a sys-
          tem name. If the connection attempt to system name fails, desti-
          nation is treated as a LAN-specific address.

          The -c option must not be used together with -l.







Page 1                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     -lline
          The -l option allows you to define a specific communication line.
          line is a device name (i.e. the name of a special file) to be
          used as the communication line. This enables you to override the
          search for the first available line having the right speed.

          When the -l option is used without the -s option, the line speed
          is taken from the /etc/uucp/Devices record in which line matches
          the second field (the Line field).

          When the -l and -s options are used together, cu searches
          /etc/uucp/Devices to check if the speed requested with -s is
          available for the requested line. If it is, the connection will
          be made at the requested speed; otherwise, an error message will
          be printed and the call will not be made.

          line is typically a serially connected direct line (e.g.
          /dev/term/ab). In such cases a telephone number 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 given or line must also be configured as a direct
          line in the file /etc/uucp/Devices (see example 7). If the desti-
          nation parameter is used with this option, it must be a telephone
          number.

          The -l option must not be used together with -c.

          Warning:

          The owner of the device file must be uucp (normally UID 5), since
          cu changes the access rights of the device file.

     -bn  n is the number of bits to be processed on the line. n is either
          7 or 8. This allows a connection to be set up between systems
          with different character sizes.

          -b not specified:

          The character size of the line is set to the same value as on the
          local terminal.

     -d   cu prints diagnostic traces as an aid to debugging.

     -e   Sets EVEN data parity for data sent to the remote system.

     -h   Sets the communication mode to half-duplex. This option emulates
          the local echo command in order to support calls to other com-
          puter systems on which terminals are set to half-duplex mode.

     -n   Prompts the user for a telephone number instead of reading it
          from the command line.



Page 2                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     -o   Sets ODD data parity for data sent to the remote system.

     -t   Used to dial a terminal which has been set to auto answer. Car-
          riage returns are mapped to carriage return/line feed pairs.

     destination
          The destination parameter is used to tell cu what system to con-
          nect to. destination can be:

          -  a telephone number:

             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:

             A system name is the name of any computer that can be called
             by uucp (i.e. for which there is an entry in the file
             /etc/uucp/Systems).

          -  a LAN-specific address:

             The address of a computer in the local area network. The docu-
             mentation for your LAN will show the form of the LAN-specific
             address.

          If you call cu without using the -c or -l options, cu uses desti-
          nation to determine which medium to use. The following cases are
          possible:

          -  destination is a telephone number. cu assumes you want to use
             a telephone line and selects an automatic call unit (ACU).

          -  destination is not a telephone number. cu assumes destination
             is a system name, follows the uucp calling mechanism, uses
             /etc/uucp/Systems and /etc/uucp/Devices to obtain the best
             available connection. Since cu automatically chooses a speed
             that is appropriate for the medium that it selects, you may
             not use the -s option in this case.

          -  destination not specified:

             This is only possible if you have used the -l option to
             specify a device name to be used as the communication line.

   Conversation phase

     After making the connection, cu runs as two processes: the transmit
     process and the receive process.



Page 3                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     The transmit process reads data from standard input and passes it to
     the remote system; the receive process accepts data from the remote
     system and passes it to standard output. You can also have the output
     redirected to local files. Lines beginning with the ~ character
     (tilde) have special meanings (see below). To prevent the buffer from
     overflowing, input from the remote system is normally controlled by
     means of an automatic DC3/DC1 protocol (START/STOP control).

     Since cu does not do any integrity checking on data it transfers, data
     fields with special cu characters may not be transmitted properly.
     Depending on the connection, it may be necessary to use the ~. command
     to terminate the conversation, even if stty 0 has been used.

     The following method can be used for connections between multiple sys-
     tems: (multiple links): when cu is used on system X to connect to sys-
     tem Y and subsequently used on system Y to connect to system Z, cu
     commands on system Y can be executed by preceding them with ~~. The
     name of the system executing the command can be determined with uname.
     For example, uname can be executed on Z, X, and Y as follows:

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

     A leading tilde causes the command to be executed on the local
     machine; two leading tildes cause the command to be executed on the
     next machine in the chain.

     The "transmit" process can be controlled with the following commands:

     ~.   Terminates the conversation.

     ~!   Invokes a subshell on the local system.

     ~!command
          Runs the command on the local system via sh -c, i.e. in a sub-
          shell.

     ~$command
          Runs the command on the local system, sending its output to the
          remote system.

     ~%cd [directory]
          Changes to the specified directory on the local system. ~!cd can-
          not be used to change the directory, as this will run the command
          in a separate subshell, and thus be ineffective for the cu pro-
          cess.




Page 4                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     ~%take source [destination]
          Copies the file source on the remote system to the file destina-
          tion on the local system.

          destination not specified:

          source is also used as the name of the destination file.

          ~%take requires the existence of echo and cat on the remote sys-
          tem. Furthermore, tabs mode [see stty(1)] should be set on the
          remote system if tabs are to be copied without expansion to
          spaces. Non-printing characters are not transmitted dependably by
          the ~%take command.

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

     ~%put source [destination]
          Copies the file source on the local system to the file destina-
          tion on the remote system.

          destination not specified:

          source is also used as the name of the destination file.

          ~%put requires the existence of stty and cat on the remote sys-
          tem. The current erase and kill characters on the remote system
          must also be set to the same value as on the local system [see
          stty(1)]. Backslashes are inserted at appropriate places. Non-
          printing characters are not transmitted dependably by the ~%put
          command.

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

     ~~ line
          Sends the line ~ line to the remote system.

     ~%break
          Transmits a BREAK signal to the remote system.

     ~%b  Same as ~%break.

     ~%debug
          Toggles the debugging option -d on or off.

     ~%d  Same as ~%debug.

     ~t   Prints the values of the termio structure variables [see
          termio(7)] for the user's terminal. This option is useful for
          debugging.



Page 5                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     ~l   Prints the values of the termio structure variables for the
          remote communication line. This option is useful for debugging.

     ~%ifc
          Toggles between DC3/DC1 (START/STOP) input control protocol and
          no input control. This is useful when the remote system does not
          respond properly to the DC3 and DC1 characters.

     ~%nostop
          Same as ~%ifc.

     ~%ofc
          Toggles the output flow control setting. When enabled, the flow
          of outgoing data may be controlled by the remote host.

     ~%noostop
          Same as ofc.

     ~%divert
          Allows/disallows unsolicited diversions, i.e. diversions not
          specified by ~%take.

     ~%old
          Allows/disallows old-style syntax for received diversions.

     Note:

     There is an artificial slowing of transmission by cu during ~%put
     operations so that loss of data is unlikely. Files transferred using
     ~%take or ~%put must end with a newline, as otherwise the operation
     will hang. Entering a <CTRL-D> command usually clears the hang condi-
     tion.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed. If LCMESSAGES is undefined or is defined
     as the null string, it defaults to the value of LANG. If LANG is like-
     wise undefined or null, the system acts as if it were not internation-
     alized.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

EXAMPLES
     Example 1

     Dialing a system whose telephone number is 9 1 201 555 1234 using a
     line speed of 1200 baud (where dial tone is expected after the 9):

     cu -s1200 9=12015551234



Page 6                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     Example 2

     Logging in to a system which is on a Datakit VCS LAN, but which has
     not been defined by your system administrator (i.e. is not entered in
     /etc/uucp/Systems):

     cu -cDK address

     DK is the name of the Datakit LAN, and address is the Datakit address
     in the form /area/exchange/machine.

     Example 3

     Logging in to a system connected by a direct line (XX can be any
     device name):

     cu -l /dev/term/XX

     or

     cu -l term/XX

     Example 4

     Dialing a system using a specific line associated with an auto dialer:

     cu -l culXX 9=12015551234

     Example 5

     Establishing a connection using the system name:

     cu systemname

     Example 6

     The remote system does not have to be a UNIX system. As the following
     example shows, you could also use cu to call up a PostScript printer
     in interactive mode and then enter PostScript commands interactively.
     In this example, the PostScript printer is associated with the special
     file /dev/lpPS and is set to a line speed of 9600 baud with even par-
     ity. The spooler must be deactivated for this printer.

     The connection is established with the following command:

     cu -l /dev/lpPS -s9600 -e

     You can then enter PostScript commands directly or use the $cat file
     command to send a file containing PostScript commands to the printer.
     Note that many PostScript printers require you to enter the keyword
     executive before interactive operations can be performed. This keyword
     must be typed in "unseen", as it is not echoed on the screen.


Page 7                       Reliant UNIX 5.44                Printed 11/98

cu(1)                                                                 cu(1)

     Example 7

     A modem (V32bis) is connected to the line /dev/ttyc1 and the following
     command is to be used to establish a connection to the modem:

     cu -l /dev/ttyc1

     /etc/uucp/Devices and /etc/uucp/Dialers must have the following con-
     tents:

     Devices:

     ACU     /dev/ttyc1,M - 9600 v32bis
     Direct  /dev/ttyc1,M - 9600 direct

     Dialers:

     v32bis  =,-, "" \M ... \m\c
     direct  "" "" \M

FILES
     /etc/uucp/Sysfiles

     /etc/uucp/Systems

     /etc/uucp/Devices

     /etc/uucp/Dialers

     /var/spool/locks/*

SEE ALSO
     cat(1), ct(1), echo(1), stty(1), uucp(1), uname(1), uuname(1).





















Page 8                       Reliant UNIX 5.44                Printed 11/98

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