2023-11-11 13:36:51 +00: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 13:50:28 +01:00
|
|
|
`rcp {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 13:36:51 +00:00
|
|
|
|
|
|
|
- Copy a directory recursively:
|
|
|
|
|
2024-06-25 13:50:28 +01:00
|
|
|
`rcp -r {{path/to/local_directory}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 13:36:51 +00:00
|
|
|
|
|
|
|
- Preserve the file attributes:
|
|
|
|
|
2024-06-25 13:50:28 +01:00
|
|
|
`rcp -p {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|
2023-11-11 13:36:51 +00:00
|
|
|
|
|
|
|
- Force copy without a confirmation:
|
|
|
|
|
2024-06-25 13:50:28 +01:00
|
|
|
`rcp -f {{path/to/local_file}} {{username}}@{{remote_host}}:{{/path/to/destination/}}`
|