uucp - system-to-system copy
uucp [-cCdfjmr][-n user] source-file... destination-file
The uucp utility copies files named by the source-file arguments to the destination-file argument. The files named can be on local or remote systems.
The uucp utility cannot guarantee support for all character encodings in all circumstances. For example, transmission data may be restricted to 7-bits by the underlying network, 8-bit data and filenames need not be portable to non-internationalised systems, and so on. Under these circumstances, it is recommended that only characters defined in the ISO/IEC 646:1991 standard International Reference Version (equivalent to ASCII) 7-bit range of characters be used, and that only characters defined in the Portable Filename Character Set be used for naming files.
The uucp utility supports the XBD specification, Utility Syntax Guidelines . The following options are supported:
- Do not copy local file to the spool directory for transfer to the remote machine (default).
- Force the copy of local files to the spool directory for transfer.
- Make all necessary directories for the file copy (default).
- Do not make intermediate directories for the file copy.
- Write the job identification string to standard output. This job identification can be used by uustat to obtain the status or terminate a job.
- Send mail to the requester when the copy is completed.
- -n user
- Notify user on the remote system that a file was sent.
- Do not start the file transfer; just queue the job.
The following operands are supported:
- A pathname of a file to be copied to, or from, respectively. Either name can be a pathname on the local machine, or can have the form:where system-name is taken from a list of system names that uucp knows about; see uuname. The destination system-name can also be a list of names such as:
system-name!pathnamein which case, an attempt is made to send the file via the specified route to the destination. Care should be taken to ensure that intermediate nodes in the route are willing to forward information. The shell pattern matching notation characters "?", "*" and [...] appearing in pathname will be expanded on the appropriate system. Pathnames can be one of:
- An absolute pathname.
- A pathname preceded by ~user where user is a login name on the specified system and is replaced by that user's login directory. Note that if an invalid login is specified, the default is to the public directory (called "PUBDIR"; the actual location of PUBDIR is implementation-dependent).
- A pathname preceded by ~/destination where destination is appended to PUBDIR.
- This destination will be treated as a filename unless more than one file is being transferred by this request or the destination is already a directory. To ensure that it is a directory, follow the destination with a /. For example, ~/dan/ as the destination will make the directory PUBDIR/dan if it does not exist and put the requested files in that directory.
- Anything else is prefixed by the current directory.
If the result is an erroneous pathname for the remote system, the copy will fail. If the destination-file is a directory, the last part of the source-file name is used.
The read, write and execute permissions given by uucp are implementation-dependent.
The files to be copied are regular files.
The following environment variables affect the execution of uucp:
- Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
- If set to a non-empty string value, override the values of all the other internationalisation variables.
- Determine the locale for the behaviour of ranges, equivalence classes and multi-character collating elements within bracketed filename patterns.
- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files) and the behaviour of character classes within bracketed filename patterns (for example, '[[:lower:]]*').
- Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and informative messages written to standard output.
- Determine the format of date and time strings output by uucp.
- Determine the location of message catalogues for the processing of LC_MESSAGES .
- Determine the timezone used with date and time strings.
Used only for diagnostic messages.
The output files (which may be on other systems) are copies of the input files.
If the -m is used, mail files will be modified.
The following exit values are returned:
- Successful completion.
- An error occurred.
The domain of remotely accessible files can (and for obvious security reasons usually should) be severely restricted.
Note that the "!" character in addresses has to be escaped when using csh as a command interpreter because of its history substitution syntax. For ksh and sh the escape is not necessary, but may be used.
Typical implementations of this utility require a communications line configured to use the XBD specification, General Terminal Interface , but other communications means may be used. On systems where there are no available communications means (either temporarily or permanently), this utility will write an error message describing the problem and exit with a non-zero exit status.
As noted above, shell metacharacters appearing in pathnames are expanded on the appropriate system. On an internationalised system, this is done under the control of local settings of LC_COLLATE and LC_CTYPE . Thus, care should be taken when using bracketed filename patterns, as collation and typing rules may vary from one system to another. Also be aware that certain types of expression (that is, equivalence classes, character classes and collating symbols) need not be supported on non-internationalised systems.
mailx, uuencode, uulog, uuname, uustat, uux.