我正在使用
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下载文件,就会重新建立网络连接,直到文件完全传输.
原文地址:https://www.jb51.cc/linux/393418.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。