centos7两个文件复制
时间: 2023-08-09 09:12:42 浏览: 223
文件的复制
在CentOS 7中,可以使用scp命令来复制文件。假设你要将名为file-in-server-1的文件从主机1复制到主机2的/root/目录下,并将其命名为file-in-server-2。你可以在主机2上执行以下命令:
```
$ scp root@<主机1的IP地址>:/path/to/file-in-server-1 /root/file-in-server-2
```
在这个命令中,你需要将<主机1的IP地址>替换为主机1的实际IP地址,并将/path/to/file-in-server-1替换为file-in-server-1文件的实际路径。然后,该文件将被复制到主机2的/root/目录下,并命名为file-in-server-2。\[3\]
#### 引用[.reference_title]
- *1* *3* [CentOS 7 - 在两台主机之间复制文件(scp (security copy))](https://blog.csdn.net/qq_29761395/article/details/111670956)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Centos7复制文件显示进度](https://blog.csdn.net/weixin_50345511/article/details/112506877)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文