2023-11-11 14:36:51 +01:00
|
|
|
# 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:
|
|
|
|
|
2024-06-25 14:50:28 +02:00
|
|
|
`rcp {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 14:36:51 +01:00
|
|
|
|
|
|
|
- Copy a directory recursively:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rcp {{[-r|--recursive]}} {{path/to/local_directory}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 14:36:51 +01:00
|
|
|
|
|
|
|
- Preserve the file attributes:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rcp {{[-p|--preserve]}} {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 14:36:51 +01:00
|
|
|
|
|
|
|
- Force copy without a confirmation:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`rcp {{[-f|--from]}} {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|