用PuTTY鏈接Linux上傳下載文件經常使用方法
時間 2020-01-21
標籤
putty
鏈接
linux
上傳
下載
文件
經常
使用方法
用pscp上傳文件到Linux: linux
- pscp -pw password -P port d:\putty\sourcefile.txt root@remote_host :/dest_dir/
用psftp鏈接Linux,從linux上下載文件:session
- psftp -l root -pw password -P port remote_host
查看幫助:ui
- psftp> help
- ! run a local command
- bye finish your SFTP session
- cd change your remote working directory
- chmod change file permissions and modes
- close finish your SFTP session but do not quit PSFTP
- del delete files on the remote server
- dir list remote files
- exit finish your SFTP session
- get download a file from the server to your local machine
- help give help
- lcd change local working directory
- lpwd print local working directory
- ls list remote files
- mget download multiple files at once
- mkdir create directories on the remote server
- mput upload multiple files at once
- mv move or rename file(s) on the remote server
- open connect to a host
- put upload a file from your local machine to the server
- pwd print your remote working directory
- quit finish your SFTP session
- reget continue downloading files
- ren move or rename file(s) on the remote server
- reput continue uploading files
- rm delete files on the remote server
- rmdir remove directories on the remote server
對本地文件的命令都是以「l」開頭的。
將遠程當前工做目錄文件sourcefile.txt下載到
本地當前工做目錄中:
- psftp> get sourcefile.txt
將本地當前工做目錄文件sourcefile.txt上傳到
遠程當前工做目錄中: