歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 如何用scp命令實現linux系統之間的文件復制

如何用scp命令實現linux系統之間的文件復制

日期:2017/3/3 15:52:59   编辑:關於Linux

scp基於ssh登錄。

把root文件夾test.tar.gz文件復制到遠程主機root目錄,命令如下:

scp /root/test.tar.gz [email protected]:/root

回車後會提示你輸入172.19.2.75主機的root用戶登錄密碼。

scp一般使用如下:

scp local_file remote_username@remote_ip:remote_folder

scp local_file remote_username@remote_ip:remote_file

把文件從遠程主機copy到當前系統root目錄下。

scp [email protected]:/root/test.tar.gz /root

復制目錄:

scp -r local_folder remote_username@remote_ip:remote_folder

scp -r /home/test_folder root@IP:/root/others/

將本地test_folder目錄復制到遠程 others 目錄下

本欄目更多精彩內容:http://www.bianceng.cn/OS/Linux/

Copyright © Linux教程網 All Rights Reserved