我試圖將文件從一個Linux系統複製到另一個Linux系統。我是否正確使用scp
?這個命令的來源和目的地是什麼以下scp命令中的源和目標是什麼?
scp -r ~/setup [email protected]: ~/
?
我試圖將文件從一個Linux系統複製到另一個Linux系統。我是否正確使用scp
?這個命令的來源和目的地是什麼以下scp命令中的源和目標是什麼?
scp -r ~/setup [email protected]: ~/
?
基本語法
scp source_file_name [email protected]_host:destination_folder
在你的情況
~/setup : is the source [~ : root directory and setup is a folder which you want to copy to a destination]
[email protected]: is the destination
~/: location in a destination [in this case which is a root directory]
要了解更多打下面的鏈接
這個問題在unix.stackexchange適合更好。
這裏,在您的home
目錄(在您執行此命令的機器中)中的名爲setup的文件是源,並且機器上的home
目錄是[email protected]是目標。這是一個命令複製,它不會move
(你會保留原來的副本),所以如果這是你想要的,那麼你正確的scp
命令。
但我執行此查詢從[email protected]主目錄複製到我的主目錄 – user7750849
@ user7750849請參閱http://man7.org/linux/man-pages/man1/scp.1.html和https:// linux.die.net/man/1/scp。你應該做的第一件事是執行'man scp'或'scp help'。 – 0xc0de
'〜/ setup'是源代碼,'[email protected]:〜/'是目標(即遠程主機上的〜/') – kaylum
在UNIX系統上,任何命令都附帶手冊頁。請閱讀它! – hek2mgl