uucp
Copy files between Unix systems
SYNOPSIS
uucp [options] source-file... destination-file
uucp [-c | -C] [-d | -f] [-g grade] [-j] [-m] [-n user] [-r] [-s file] [-x debug_level] source ... destination
PARAMETERS
-c
Do not copy local source files to the spool directory, but stream them directly to uucico. This option saves disk space but may fail if the local file is modified before transfer.
-C
Force the copying of local source files to the spool directory before transfer. This is often the default behavior and ensures consistency during transfer.
-d
Create all necessary intermediate directories on the remote system for the destination-file if they do not already exist.
-f
Do not create any intermediate directories on the remote system. If the required directories do not exist, an error will be reported.
-g grade
Assign a specific grade (priority) to the job. Lower grades (e.g., 'A') are transferred first. The default grade is typically 'C'.
-j
Print the UUCP job ID (job number) on standard output after the transfer request has been spooled.
-m
Send mail to the requesting user upon successful completion or failure of the transfer of the source-file.
-n user
Notify the specified user on the remote system via mail that the file has arrived.
-r
Queue the job for transfer but do not start the transfer program (uucico) immediately. The transfer will be initiated later by a scheduled uucico run.
-s file
Report the status of the transfer to the specified local file instead of sending mail.
-x debug_level
Turn on debugging output to standard error, with debug_level controlling the verbosity (typically 0-9).
source-file
The path to the source file. This can be a local file path or a remote file specified as `system!path`.
destination-file
The path to the destination. This can be a local file path or a remote location specified as `system!path`.
DESCRIPTION
The uucp (Unix-to-Unix Copy) command is a foundational utility from the UUCP suite, designed for transferring files between different Unix-like machines. It allows users to copy files to or from remote systems, often leveraging dial-up modems, serial connections, or early network protocols. Unlike modern tools that perform immediate transfers, uucp typically spools transfer requests, queuing them for later execution by the uucico daemon. This asynchronous approach was crucial in environments with intermittent connectivity. Users specify remote file paths using a 'system!path' notation. While largely superseded by more secure and efficient protocols like scp and rsync for modern internet usage, uucp played a pivotal role in early internetworking, the spread of Usenet, and the general interconnectedness of Unix systems before the widespread adoption of TCP/IP.
CAVEATS
uucp is an older protocol with several limitations compared to modern file transfer methods. It often lacks strong encryption, making it less secure for sensitive data transfers over untrusted networks. Its configuration can be complex, involving multiple configuration files and daemons, which can be challenging to manage. Furthermore, error handling and status reporting can be less user-friendly than contemporary tools. For most modern use cases, more secure and efficient alternatives like scp or rsync are highly recommended. Interoperability with non-UUCP systems is also limited.
REMOTE PATHNAMES
uucp uses a specific syntax for referring to remote files. A remote system is typically specified by prefixing the filename with the system's name and an exclamation mark, like `system!/path/to/file`. A path starting with `~user/` (e.g., `system!~user/file`) refers to a file within the specified user's home directory on the remote system. A `!/` (e.g., `!/path/to/file`) can refer to a local path with an absolute path, useful when distinguishing local and remote systems in complex scripts. This notation allows flexible specification of file locations across the UUCP network.
JOB SPOOLING
A key characteristic of uucp is its asynchronous operation through job spooling. When a uucp command is executed, it typically doesn't perform the transfer immediately. Instead, it creates a job entry (control file, data files) in a local spool directory. The actual transfer is then handled by the uucico daemon, which periodically checks the spool directory for pending jobs and initiates connections to remote systems to exchange data. This mechanism was essential for handling intermittent network connectivity and batch processing, allowing transfers to happen efficiently during off-peak hours or when connections became available.
HISTORY
Developed at Bell Labs in 1976 by Mike Lesk, Dave Farber, and Joe Ossanna, uucp emerged as a groundbreaking utility for connecting disparate Unix systems. It became the backbone for early Wide Area Networks (WANs), facilitating the exchange of email, files, and newsgroup articles (Usenet) long before the internet became mainstream. Its design focused on robustness over unreliable, slow connections, often dial-up modems. While its primary role diminished with the rise of TCP/IP and the internet in the late 1980s and 1990s, the UUCP suite left an indelible mark on network computing, pioneering many concepts of asynchronous communication and distributed systems.


