加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 如何恢复中断下载自动卷曲?

发布时间:2020-12-13 19:45:19 所属栏目:Linux 来源:网络整理
导读:我正在使用 Linux中的卷曲.我正在ftp服务器下载文件的一部分(使用-r选项),但我的连接不好,它总是中断.我想编写一个脚本,当我再次连接时,它会恢复下载. 我已经使用这个命令,但它不工作: until curl -r 666-9999 -C - --retry 999 -o "path/to/file" "ftp:/pa
我正在使用 Linux中的卷曲.我正在ftp服务器下载文件的一部分(使用-r选项),但我的连接不好,它总是中断.我想编写一个脚本,当我再次连接时,它会恢复下载.

我已经使用这个命令,但它不工作:

until curl -r 666-9999 -C - --retry 999 -o "path/to/file" "ftp:/path/to/remote/file"; do :; done

解决方法

wget是为这个用例专门构建的.从手册页:
Wget has been designed for robustness over slow or unstable network connections;
if a download fails due to a network problem,it will keep retrying until the
whole file has been retrieved.  If the server supports regetting,it will
instruct the server to continue the download from where it left off.

wget几乎可以用于所有的Linux发行版 – 它可能已经安装在你的.只需使用wget下载文件,就会重新建立网络连接,直到文件完全传输.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读