Home arrow Site Navigation arrow FAQs and HowTo's arrow Unix Tutorials arrow Unix Tutorial 5.5 uucp: Unix to Unix Copying
Unix Tutorial 5.5 uucp: Unix to Unix Copying | Print |
 

The uucp utility copies from the source-file to the destination-file. The source and destination files may be on the same machine, or on different systems. To specify a different system, use an exclamation point between the system name and the path:

system-name!path

Any files received by uucp are owned by uucp and can be read by anyone (protection is 0666 for read and write; execute permissions are preserved as in the original). The usual moe of operation is to specify the path as /usr/spool/uucp/mydir where mydir is a subdirectory you have created in the uucp directory. Since all the files in this directory are open to anyone, keep in mind two things: 1) If you receive a file with uucp that is important or ought to be private, immediately make a copy in your own home directory with the protections you want it to have, and delete the copy in the uucp directory 2) It is usual to stay out of other people's personal subdirectories in the uucp directory.

Using uucp

% uucp [option] source-file destination-file is the basic uucp command syntax.

For example:

% uucp -d thatfile thisfile Makes all necessary directories if they do not already exist.
% uucp -c thatfile thisfile Copies directly from the source file, rather than making a copy of the source file in the spoll directory.
% uucp -m thatfile thisfile Sends you a mail message when the copy is finished. This works only when sending files or receiving a single file. It will not work if the names of the files being received contain the special characters ?*[].
% uucp -W thatfile thisfile Does not put the current working directory on the front of remote file names if a full path is not specified.

Related commands

% uuencode filename whereto | mail sys1!sys2!..!decode  
% uudecode filename Encode/decode binary files for transmission through a mail system. Binary files sent without encoding may be trashed during transmission. The whereto field is encoded in the file to be decoded. See the man page on uuencode (1c).
% uulog -ssystemname Show information about transfer using systemname.
% uulog -uusername Show information about transfers done for this username.
% uuname List known systems.
% uuname -1 Give the local system name.
% uusend thisfile thatsys!thatpath Send a file to a remote system. See man page on uusend (1c).
% uustat Give the status of your uucp requests. See man page on uustat (1c) for more information and options.