gpt4 book ai didi

linux - 使用 wget 同时进行多个下载

转载 作者:太空宇宙 更新时间:2023-11-04 04:54:19 25 4
gpt4 key购买 nike

我有一个 link.txt,其中包含多个下载链接,所有链接均受相同的用户名和密码保护。

我的意图是同时下载多个文件,如果文件包含5个链接,则同时下载所有5个文件。

我已经尝试过了,但没有成功。

cat links.txt | xargs -n 1 -P 5 wget --user user007 --password pass147
and
cat links.txt | xargs -n 1 -P 5 wget --user=user007 --password=pass147

给我这个错误:

Reusing existing connection to www.site.com HTTP request sent, awaiting response... 404 Not Found

此消息出现在我尝试下载的所有链接中,除了开始下载的文件中的最后一个链接。

我目前正在使用,但这次只下载一个文件

wget -user=admin --password=145788s -i links.txt

最佳答案

使用 wget 的 -i-b 标志。

-b
--background
Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.


-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 -.)

您的命令将如下所示:wget --user user007 --password "pass147*"-b -i links.txt

注意:您应该始终用特殊字符(例如:*)引用字符串。

关于linux - 使用 wget 同时进行多个下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51357521/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com