首页 > 解决方案 > 使用 wget 下载具有重复名称的链接列表

问题描述

我有一个链接列表,但是有些链接具有相同名称的不同文件。这是我的to_download.txt文件的片段:

https://www.url.domain/world/2000/may/15/one
https://www.url.domain/world/2000/nov/07/two
https://www.url.domain/world/2000/nov/17/three
https://www.url.domain/world/2000/apr/17/two
https://www.url.domain/world/2000/feb/13/one
https://www.url.domain/world/2000/jun/26/three
https://www.url.domain/world/2000/apr/25/one

当我使用具有重复文件名(一、一、一等)wget -i /to_download.txt的 URL 时,只有一个文件onetwothree

标签: downloadwget

解决方案


因为您正在覆盖文件。你不能有两个同名的文件。您可以为每个月或任何模式创建单独的文件夹。


推荐阅读