SSH初级命令整理(五)

接着上一篇 SSH初级命令整理(四)

这次主要讲 ssh 下的  ftp 命令的一个用法。

早在  SSH初级命令整理(二) 的结尾我就提到了这个命令,不过什么时候会用到它呢?看实例吧。

需求:将 2.3GB 的文件(格式/mp3,10Mb/首) 由FTP A上传到某 FTP B

FTP B 接收上限速度 <5Mb/s
FTP B wget 速度 <10Mb/s
FTP A 本地下载速度 <1Mb/s
hzlzh 本地上传速度  100K/s
方法1,常规方法耗时:
40分钟(下载)+6.7小时(上传)
方法2,ssh 远程上传耗时:
0分钟(下载)+8分钟(上传)
方法3,ssh wget 下载耗时:
4分钟(下载)+0分钟(上传)

[特别说明--本例中:源FTP A 有开通SSH,目标 FTP B 没有开通SSH,因此不能直接用wget 来下载文件]

方法2 步骤如下:

  1. ssh 登录 FTP A,ls cd 进入到待上传文件的目录(必做);
  2. 依次输入以下命令:
    >>
    ftp
    ftp>open ftp.zlz.im
    ftp>……..FTP Username
    ftp>……..FTP Password
    ftp>put source-file.zip  new-file.zip
  3. 输入put 命令后,出现以下提示表示已经开始传输:
    PORT command successful
    Connecting to port 5***9
    等待直至传输完毕,返回速度。输入 quit 登出

PS1:待上传的文件名不能含有空格;
PS2:部分主机不支持过大文件的 Zip 包,可以分而治之。

附图demo

版权所有© HzlzH | 本文采用 BY-NC-SA 进行授权
转载需注明 转自: 《SSH初级命令整理(五)

相关文章

{ Leave a Reply ? }

  1. Ethan United States Google Chrome Windows

    先坐沙发,再来看文章。

  2. 百度非官方 China Mozilla Firefox Windows

    不懂。

  3. icold China Google Chrome Windows

    看着命令就头痛现在 :idea:

  4. 大智若鲁 China Mozilla Firefox Windows


    你的主题越来越好看了,貌似一年前你就说要共享的

  5. 图图 China Google Chrome Windows

    整理的越来越专业了

  6. 友豪 China Mozilla Firefox Windows

    好专业啊! :-?

  7. 奚少 China Mozilla Firefox Windows

    嗯,这个可以了解一下~~ :lol:

  8. 郎中中 China Google Chrome Windows

    哈哈 我也在折腾VPS~SSH命令还是要记一记的! :mrgreen:

  9. zwwooooo China Mozilla Firefox Windows

    喜欢wget,下载再上传真的很蛋疼——可怜的adsl

  10. 识字 China Google Chrome Windows

    我来逛逛,顺便帮博主顶一下,嘿嘿。

  11. 淘宝皇冠店 China Internet Explorer Windows

    太专业了.不过来了,还是支持一下.

  12. ixwebhosting China Google Chrome Windows

    我用的也是PUTTY,哈哈

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)