1. 程式人生 > >linux scp

linux scp

1、拷貝本機/home/qxc/tx整個目錄至遠端主機192.168.1.100的/home/qxc目錄下。-r:recursive

scp -r /home/qxc/tx/ root@192.168.1.100:/home/qxc

2、拷貝單個檔案至遠端主機


scp /home/qxc/tx/test.txt root@192.168.1.100:/home/qxc

3、遠端檔案/資料夾下載
舉例,把192.168.62.100上面的/root/資料夾,下載到本地的/home/qxc/tx/下,使用遠端端的root登陸

scp -r qxc@192.168.62.100:/root/ /home/qxc/tx