用PuTTY连接Linux上传下载文件常用方法

 用pscp上传文件到Linux:

[plain]  view plain copy
  1. pscp -pw password -P port d:\putty\sourcefile.txt root@222.73.236.94:/dest_dir/  

 

用psftp连接Linux,从linux上下载文件:

[plain]  view plain copy
  1. psftp -l root -pw password -P port 222.73.236.94  

查看帮助:

[plain]  view plain copy
  1. psftp> help  
  2. !      run a local command  
  3. bye    finish your SFTP session  
  4. cd     change your remote working directory  
  5. chmod  change file permissions and modes  
  6. close  finish your SFTP session but do not quit PSFTP  
  7. del    delete files on the remote server  
  8. dir    list remote files  
  9. exit   finish your SFTP session  
  10. get    download a file from the server to your local machine  
  11. help   give help  
  12. lcd    change local working directory  
  13. lpwd   print local working directory  
  14. ls     list remote files  
  15. mget   download multiple files at once  
  16. mkdir  create directories on the remote server  
  17. mput   upload multiple files at once  
  18. mv     move or rename file(s) on the remote server  
  19. open   connect to a host  
  20. put    upload a file from your local machine to the server  
  21. pwd    print your remote working directory  
  22. quit   finish your SFTP session  
  23. reget  continue downloading files  
  24. ren    move or rename file(s) on the remote server  
  25. reput  continue uploading files  
  26. rm     delete files on the remote server  
  27. rmdir  remove directories on the remote server  

对本地文件的命令都是以“l”开头的。


将远程当前工作目录文件sourcefile.txt下载到 本地当前工作目录中:
[plain]  view plain copy
  1. psftp> get sourcefile.txt  

将本地当前工作目录文件sourcefile.txt上传到 远程当前工作目录中:
[plain]  view plain copy
  1. psftp> put  source.txt  

查看端口使用情况:

[plain]  view plain copy
  1. netstat -tanp  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值