歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下scp命令詳解

Linux下scp命令詳解

日期:2017/2/28 15:54:03   编辑:Linux教程

scp是 secure copy的縮寫, scp是linux系統下基於ssh登陸進行安全的遠程文件拷貝命令。linux的scp命令可以在linux服務器之間復制文件和目錄.

命令格式:

scp -r local_folder remote_username@remote_ip:remote_folder

或者

scp -r local_folder remote_ip:remote_folder

第1個指定了用戶名,命令執行後需要輸入用戶密碼;

第2個沒有指定用戶名,命令執行後需要輸入用戶名和密碼;

例子:

scp -r /home/linux/soft/ [email protected]:/home/linux/others/

scp -r /home/linux/soft/ www.linuxidc.com:/home/linux/others/

上面 命令 將 本地 soft 目錄 復制 到 遠程 others 目錄下,即復制後遠程服務器上會有/home/linux/others/soft/ 目錄

Copyright © Linux教程網 All Rights Reserved