Which of the following commands will securely copy the directory ./fyf/ to /var/tmp/ on the remote host deltaur using the remote user account kevin?



A.

rsync -a -e ssh kevin@deltaur:/var/tmp/ fyf/

B.

rsync -a -u kevin -e ssh fyf/ deltaur:/var/tmp/

C.

rsync -a -u kevin -e ssh deltaur:/var/tmp/ fyf/

D.

rsync -a -e ssh fyf/ kevin@deltaur:/var/tmp/

題解

「rsync」是一個快速、多樣化且支援遠端操作的檔案複製工具和指令,可以用來備份與還原檔案。「-a」參數可以將多檔案封裝在一起。「-e」參數可以設定要用來進入遠端主機的Shell指令(通常會使用「ssh」)。「-u」(update)參數可以略過覆蓋接收端上比備份還新的檔案。而來源和目的的檔案路徑參數順序是,來源在前,目的在後。如果路徑要透過遠端主機的Shell指令來存取,格式為「[使用者名稱@]主機名稱:路徑」。

因此答案是選項「D」。