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

使用curl下载文件中列出的网址?

发布时间:2020-12-13 18:26:02 所属栏目:Linux 来源:网络整理
导读:我有一个文件,其中包含我需要下载的所有网址. 但是我需要一次限制一次下载. 即下一次下载应该只在前一次下载完成后开始. 这是可以使用卷曲吗?或者我应该使用其他任何东西. 解决方法 wget(1) 默认情况下是连续工作的,并且内置了此选项: -i file --input-fil
我有一个文件,其中包含我需要下载的所有网址.
但是我需要一次限制一次下载.
即下一次下载应该只在前一次下载完成后开始.
这是可以使用卷曲吗?或者我应该使用其他任何东西.

解决方法

wget(1)默认情况下是连续工作的,并且内置了此选项:
-i file
   --input-file=file
       Read URLs from a local or external file.  If - is specified as file,URLs are read from the standard input.  (Use ./- to read from a file literally named -.)

       If this function is used,no URLs need be present on the command line.  If there are URLs both on the command line and in an input file,those on the command lines will be the first ones to be retrieved.  If
       --force-html is not specified,then file should consist of a series of URLs,one per line.

       However,if you specify --force-html,the document will be regarded as html.  In that case you may have problems with relative links,which you can solve either by adding "<base href="url">" to the documents
       or by specifying --base=url on the command line.

       If the file is an external one,the document will be automatically treated as html if the Content-Type matches text/html.  Furthermore,the file's location will be implicitly used as base href if none was
       specified.

(编辑:李大同)

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

    推荐文章
      热点阅读