uucp(1)								      uucp(1)



NAME

  uucp - Copies files from one system to another (UNIX to UNIX system copy)

SYNOPSIS

  uucp [-d | -f] [-ggrade] [-cCjmr] [-nuser] [-sfile] [-xdebug_level]
       source ...  destination

  The uucp command copies one or more source files from one system to one or
  more destination files on another system.

FLAGS

  -c  Transfers the source files to the destination on the specified com-
      puter.  The source files are not copied into the spool directory for
      transfer.	 This saves the system from copying possibly large files to
      the spooling directory for transfer.  (See the discussion of the -C
      flag.)

  -C  Copies local files to the spool directory for transfer.  Depending on
      the configuration of the Poll and Systems files, and on how often the
      uusched command is run, the files could be transferred immediately (on
      demand polling), or in the future.  This flag is on by default.
      Occasionally, there are problems in transferring a source file; for
      example, the remote computer might not be working, or the login attempt
      might fail.  In such a case, the file remains in the spool directory
      until it is either transferred successfully or removed by the uucleanup
      command.

  -d  Creates any intermediate directories needed to copy the source files to
      the destination.	Instead of first creating a directory and then copy-
      ing files to it, the uucp command can be entered with the destination
      pathname, and the required directory will be created.  This flag is on
      by default.

  -f  Suppresses creation of intermediate directories during the file
      transfer.

  -ggrade
      Specifies when the files are to be transmitted during a particular con-
      nection.	grade is a single number (0-9) or ASCII letter (A-Z, a-z);
      lower ASCII-sequence characters cause the files to be transmitted ear-
      lier than do higher sequence characters.	The number 0 is the highest
      (earliest) grade; z is the lowest (latest) grade.	 The default is N.

  -j  Displays the job identification number of the transfer operation on
      standard output.	This job ID can be used by the uustat command to
      obtain the status of information about the status of a particular job,
      or with uustat -k to terminate the transfer before it is completed.

  -m  Sends mail to the requester when the transfer to the remote system is
      completed.  The message is sent to the requester's mailbox, using the
      mailx command.  No mail is sent for a local transfer.
      The -m flag works only when sending files or receiving a single file.
      It does not work when forwarding files.  Receiving multiple files
      specified by the shell pattern-matching characters ?, *, and [...] does
      not activate the -m flag.

  -nuser
      Notifies the user specified by user on the designated system that files
      were sent.  The mail system does not send a message for a local
      transfer.	 Usernames can contain only ASCII characters.

  -r  Prevents the starting of the file transfer program uucico, even if the
      command was issued at a time when calls to the remote system are per-
      mitted.  By default, a call to the remote system is attempted if the
      command is issued during a time period specified in the Poll and Sys-
      tems files.

  -sfile
      Reports the status of the transfer to the specified file.	 In this
      case, the file designation must be a full pathname.

  -xdebug_level
      Displays debugging information on the screen of the user's terminal.
      The debug_level is a number between 0 and 9.  The higher number gives a
      more detailed report.

DESCRIPTION

  The uucp command can copy files within a local system, between a local and
  a remote system, and between two remote systems.

  The uucp command accomplishes the file transfer in two steps:	 first, by
  creating a command (C.*) file in the spooling directory on the local com-
  puter, and then by sending the request to the specified computer using the
  uucico command.

  Command files include information such as the full pathname of the source
  and destination files, and the sender's login name.  The full pathname of a
  command file is a form of the following:

       /var/spool/uucp/system/C.systemNnnnn

  where N is the grade of the request and nnnn is the hexadecimal sequence
  number used.

  If the uucp command is used with the -C flag to copy the files to the spool
  directory for transfer, uucp creates not only a command file, but also a
  data (D.*) file that contains the actual source file.	 The full pathname of
  a data file is a form of the following:

       /var/spool/uucp/system/D.systemnnnnppp

  where nnnn is a hexadecimal sequence number and ppp is a subjob ID.

  Once the command files (and data files, if necessary) are created, uucp
  calls the uucico daemon, which in turn attempts to contact the remote com-
  puter to deliver the files.

  It is useful to issue the uuname command to determine the exact name of the
  remote system before issuing uucp.  The uulog command provides information
  about uucp activities on a system.

  Pathnames



  Pathnames for the source and destination of the uucp transfer can contain
  only ASCII characters and can be one of the following:

    +  A full pathname.

    +  A relative pathname.

    +  A pathname preceded by ~user, where user is a login name on the speci-
       fied system.  The specified user's login directory is then considered
       the destination of the transfer.	 If the user specifies an invalid
       login name, the files are transferred to the public directory
       /var/spool/uucppublic, which is the default.

    +  A pathname preceded by ~/destination, where destination is appended to
       /var/spool/uucppublic.
       This destination is treated as a filename unless more than one file is
       being transferred by this request, or the destination is a directory.
       To ensure that it is a directory, follow the destination name with a /
       (slash).	 For example, ~/amy/ as the destination creates the directory
       /var/spool/uucppublic/amy, if it does not already exist, and puts the
       requested files in that directory.

  Source and Destination Filenames


  A filename can be a pathname on the local system, or can have the following
  form:

       system!pathname

  where system is taken from a list of system names that uucp knows about.

  The destination system name (destination) can also be a list of names, such
  as the following:

       system!system! ...!system!pathname

  In this case, an attempt is made to send the file along the specified route
  to the destination.  Make sure that intermediate nodes in this route are
  willing to forward information and that they actually talk to the next sys-
  tem.

  The shell pattern-matching characters ?, *, and [...] can be used in the
  pathname of the source file; the appropriate system expands them.  However,
  shell pattern-matching characters cannot be used in the pathname of the
  destination file.

  If the destination is a directory rather than a file, uucp uses the last
  part of the source name.

  Permissions


  The system administrator should restrict the access to local files by users
  on other systems.

  When transmitting files, uucp preserves execute permissions and grants read
  and write permissions to the owner, the group, and all others.  (The uucp
  command owns the file.)

  Sending files to arbitrary destination pathnames on other systems, or get-
  ting files from arbitrary source pathnames on other systems, often fails
  because of security restrictions.  The files specified in the pathname must
  give read or write permission not only for the same group of users, but
  also for any group.

  Protected files and files in protected directories owned by the requestor
  can be sent by uucp.




EXAMPLES

   1.  To copy file f1 from the local system to a remote system named hera,
       enter:
	    uucp /u/geo/f1 hera!/u/geo/f1


   2.  To copy file f2 from the remote system hera and place it in the public
       directory, enter:
	    uucp hera!geo/f2 /var/spool/uucppublic/f2


   3.  To place the f2 file in a directory other than the public directory,
       enter:
	    uucp hera!geo/f2 /u/geo/f2

       In this case, make sure that the geo login directory allows write per-
       mission to both other users and other groups (for example, with mode
       777).

FILES

  /usr/lib/uucp
	     Contains the uucico daemon.

  /var/spool/uucp
	     Spooling directory.

  /var/spool/uucppublic
	     Public directory.

RELATED INFORMATION

  Commands:  ct(1), cu(1), mailx(1)/Mail(1), rmail(1), tip(1), uucico(8),
  uucleanup(8), uuencode(1)/uudecode(1), uulog(1), uuname(1), uupick(1),
  uusched(8), uusend(1), uustat(1), uuto(1), uux(1), uuxqt(1).