0,PuTTY 自帶 PSFTP.exe 能夠用於文件傳輸
注意:如果不是以超級管理員權限打開命令提示符或接口圖標PSFTP,那么系統盤下部分文件是不允許上傳,並且部分地址不允許存放下載文件。
1,打開 PSFTP.exe
psftp: no hostname specified; use "open host.name" to connect
2,登錄遠程服務器
psftp> open xxx.xxx.xxx.xxx // ip
login as: xxx // user name
xxx@xxx.xxx.xxx.xxx's password:
Remote working directory is /xxx/xxx
3,更改&查看遠程路徑
psftp> ls // 查看當前目錄文件列表
Listing directory /xxx/xxx
drwxrwxr-x 2 xxx xxx 4096 Jun 3 00:45 xxx
drwxrwxr-x 15 xxx xxx 4096 Jun 3 00:39 xxx
drwxrwxr-x 3 xxx xxx 4096 Jun 3 22:32 xxx
psftp> cd xxx/xxx
Remote directory is now /xxx/xxx/xxx
psftp> pwd
Remote directory is /xxx/xxx/xxx
4,更改&查看本地路徑
psftp> lcd xxx/xxx
New local directory is D:\xxxx\xxx
psftp> lpwd
Current local directory is D:\xxx\xxx
5,本地上傳至服務器
psftp> put -r xxxx.xx // -r 拷貝整個目錄
6,服務器下載至本地
psftp> get -r xxxx.xx // -r 拷貝整個目錄
psftp 常用命令
put 上傳文件,目錄需要加-r
get 下載文件,目錄需要加-r
mput 上傳多個文件
mget 下載多個文件
cd 服務器端移動路徑
pwd 顯示服務器端當前所在路徑
lcd 本地端移動路徑
lpwd 顯示本地端當前所在路徑
psftp 常用選項
-p 拷貝文件的時候保留源文件建立的時間。
-q 執行文件拷貝時,不顯示任何提示消息。
-r 拷貝整個目錄
-v 拷貝文件時,顯示提示信息。<br>-sftp 強制使用sftp協議<br>-scp 強制使用scp協議
參考資料
https://www.cnblogs.com/diantong/p/10222807.html
https://blog.csdn.net/stark_summer/article/details/42640757