【发布时间】:2014-07-14 18:19:02
【问题描述】:
我有一个制表符分隔的 url 列表和目标文件名,urls_to_download.txt,例如:
first_file.jpg\thttps://www.google.co.il/images/srpr/logo11w.png
/subdir_1/second_file.jpg\thttps://www.google.co.il/images/srpr/logo12w.png
...
last_file.jpg\thttps://www.google.co.il/images/srpr/logo99w.png
我想使用多个连接下载。
我可以这样做,例如:
cat urls_to_download.txt | xargs -n 1 -P 10 wget -nc
我的问题是,如何让文件具有我想要的新名称,因此输出目录将具有:
first_file.jpg
/subdir1/second_file.jpg
...
last_file.jpg
【问题讨论】: