UUCP(1c,C) AIX Commands Reference UUCP(1c,C)
-------------------------------------------------------------------------------
uucp
PURPOSE
Copies files from one AIX system to another AIX or Unix system.
SYNTAX
+-- -c --+ +-- -d --+ +--------------------+
uucp ---| one of |---| one of |---| +----------------+ |--->
| +----+ | | +----+ | +-| -g grade |-+
+-| -c |-+ +-| -d |-+ ^| -j ||
| -C | | -f | || -m ||
+----+ +----+ || -n user ||
|| -r ||
|| -s file ||
|| -x debug-level ||
|+----------------+|
+------------------+
>--- source-files -- destination-files --|
Note: This command does not have MBCS support.
DESCRIPTION
The Basic Networking Utilities (BNU) command uucp copies one or more source
files from one AIX system to one or more destination files on another AIX or
Unix system.
The uucp command accomplishes the file transfer in two steps: first, by
creating a command (C.*) file in the spooling directory on the local computer,
and then by sending the request to the specified computer via the uucico
command.
Command files include information such as the full path name of the source and
destination files, the sender's login name, and so on. The full path name of a
command file is a form of the following:
/usr/spool/uucp/system_name/C.system_nameNxxx
where N is the grade of the request and xxxx is the hexadecimal sequence number
used by BNU.
Note: 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
path name of a data file is in the following form:
Processed November 8, 1990 UUCP(1c,C) 1
UUCP(1c,C) AIX Commands Reference UUCP(1c,C)
/usr/spool/uucp/system_name/D.system_namexxxx###
Once the command files (and data files, if necessary) are created, uucp then
calls the uucico daemon, which in turn attempts to contact the remote computer
to deliver the files.
Note: 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.
Path Names Used with uucp
Path names for the source and destination of the uucp transfer may be one of
the following:
o a full path name
o a relative path name
o a path name preceded by ~user, where user is a login name on the specified
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, /usr/spool/uucppublic, which is the default.
o A path name preceded by ~/destination, where destination is appended to
/usr/spool/uucppublic.
This destination is treated as a file name 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
"/usr/spool/uucppublic/amy", if it does not already exist, and puts the
requested files in that directory.
Source and Destination File Names
o A file name may be a path name on the local system, or may have the
following form:
system_name!path_name
where system_name is taken from a list of system names that BNU knows
about.
o The destination system_name may also be a list of names, such as the
following:
system_name!system_name!...!
system_name!path_name
Processed November 8, 1990 UUCP(1c,C) 2
UUCP(1c,C) AIX Commands Reference UUCP(1c,C)
In this case, an attempt is made to send the file via the specified route
to the destination. Make sure that intermediate nodes in this route are
willing to forward information (see Managing the AIX Operating System).
o The shell pattern-matching characters "?", "*", and "[...]" may be used in
the path names; the appropriate system expands them.
Note: The shell pattern-matching characters should not be used in the path
name of the destination file.
o If the destination is a directory rather than a file, uucp uses the last
part of the source name.
Permissions
o The system administrator should restrict the access to local files by users
on other systems.
o 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.)
o Sending files to arbitrary destination path names on other systems, or
getting files from arbitrary source path names on other systems, often
fails because of security restrictions. The files specified in the path
name must give read or write permission not only for the same group of
users, but also for any group.
o Protected files and files in protected directories owned by the requestor
can be sent by uucp.
FLAGS
-c Transfers the source files to the destination on the specified
computer. The source files are not transferred via the spool
directory. This saves the system from copying possibly large
files to the spooling directory for transfer. (See the
discussion of the -C flag.) This flag is on by default.
-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.
Note: Occasionally, there are problems in transferring a
source file. For example, the remote computer may not
be working or the login attempt may fail. In such a
case, the file remains in the spool directory until it
is either transferred successfully or removed by the
uucleanup command.
Processed November 8, 1990 UUCP(1c,C) 3
UUCP(1c,C) AIX Commands Reference UUCP(1c,C)
-d Creates any intermediate directories needed to copy the source
files to the destination. This flag is on by default.
-f Does not create intermediate directories during the file
transfer.
-ggrade Specifies when the files are to be transmitted during a
particular connection. Grade is a single number (0-9) or
letter (A-Z, a-z); lower ASCII-sequence characters cause the
files to be transmitted earlier 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
BNU command uustat to obtain the status of a 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, $HOME/.newmail. The mail command does not send a
message for a local transfer.
Note: 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 option.
-nuser_name Notifies the user specified by user_name on the designated
system that files have been sent. The mail system does not
send a message for a local transfer.
-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 permitted. By default, a call to the remote
system is attempted if the command is issued during a time
period specified in the Poll and Systems files.
-sfile Reports the status of the transfer to the specified file. In
this case, the file designation must be a full path name.
-xdebug_level Displays debugging information on the screen of the local
system. The debug_level is a number between 0 and 9. The
higher number gives a more detailed report.
EXAMPLES
1. To copy one or more files locally, within the same directory:
uucp file1 file2
Processed November 8, 1990 UUCP(1c,C) 4
UUCP(1c,C) AIX Commands Reference UUCP(1c,C)
2. To copy file "f1" from the local system to a remote system named "hera":
uucp /u/geo/f1 hera!/u/geo/f1
3. To copy file "f2" from the remote system "hera" and place it in the public
directory:
uucp hera!/u/geo/f2 /usr/spool/uucppublic/f2
4. To place the "f2" file in a directory other than the public directory:
uucp hera!/u/geo/f2 /u/geo/f2
In this case, make sure that the "geo" login directory allows write
permission to both "other" user and "other" group (for example, with mode
777).
FILES
/usr/spool/uucp Spooling directory.
/usr/spool/uucppublic Public directory.
/usr/lib/uucp Contains uucico daemon.
RELATED INFORMATION
See the following commands: "mail, Mail," "uucleanup," "uulog," "uuname,"
"uusched," "uustat," "uux," and "uuxqt."
See the information about international character support in Managing the AIX
Operating System. Also, see the chapter on basic networking utilities.
Processed November 8, 1990 UUCP(1c,C) 5