Network
rcp
Remote file copy (deprecated, use scp or rsync).
Additional Notes
rcp (remote copy) copies files and directories between local and remote systems. It uses the RSH (Remote Shell) protocol for transport, which transmits data and authentication credentials in cleartext.
rcp is deprecated and should not be used in modern environments. It has no encryption, no authentication beyond the .rhosts file, and is vulnerable to eavesdropping and session hijacking. It has been replaced by scp (Secure Copy, based on SSH) and rsync (which supports SSH and provides delta transfers, integrity checking, and more features). Most modern systems do not include rcp by default.
Syntax
rcp [options] [source...] [destination]
Parameters
source: Local or remote file path. Remote paths use the formathost:pathoruser@host:path.destination: Local or remote destination path.
Common Options
-r: Copy directories recursively.-p: Preserve file timestamps and modes.-k: Use Kerberos authentication (if supported).-x: Enable DES encryption (if supported).-t: Enable packet trace debugging.-v: Verbose output.-D: Disable interactive password prompting.
Examples
rcp file.txt remotehost:/dest/
Copy file.txt to a remote host (deprecated).
rcp -r /local/dir remotehost:/dest/
Recursively copy a directory to a remote host (deprecated).
scp file.txt user@remotehost:/dest/
Modern secure replacement using scp.
rsync -avz /local/dir/ user@remotehost:/dest/
Modern replacement with compression and delta transfer using rsync.
Practical Notes
- Do not use
rcpon modern systems. Usescp,rsync, orsftpinstead. - The RSH protocol used by
rcpsends all data, including passwords, in cleartext over the network. - Many Linux distributions no longer ship
rcpor the RSH suite. Thersh-clientorrsh-serverpackages may provide it for legacy compatibility. - Modern alternatives:
scpfor simple secure transfers,rsync -avzfor efficient syncing,sftpfor interactive transfers. - If you encounter
rcpin legacy scripts, update them to usescporrsync.