1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 14:22:07 +02:00
tldr/pages/linux/rcp.md
2024-06-25 14:50:28 +02:00

729 B

rcp

Copy files between local and remote systems. It mimics the behavior of the cp command but operates across different machines. More information: https://www.gnu.org/software/inetutils/manual/html_node/rcp-invocation.html.

  • Copy a file to a remote host:

rcp {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}

  • Copy a directory recursively:

rcp -r {{path/to/local_directory}} {{username}}@{{remote_host}}:{{/path/to/destination/}}

  • Preserve the file attributes:

rcp -p {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}

  • Force copy without a confirmation:

rcp -f {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}