2015-09-30 39 views
0

使用wget -r -P Home -A jpg http://example.com将导致我从该网站目录中的文件列表,我正在寻找的只是如何查询搜索,如:wget -r -P home -A jpg http://example.com/from 65121 to 75121/ file_ 100 to 200.jpg在Linux上使用wget来扫描子文件夹的特定文件

例(s):

wget -r -P home -A jpg http://example.com/65122/file_102.jpg 
wget -r -P home -A jpg http://example.com/65123/file_103.jpg 
wget -r -P home -A jpg http://example.com/65124/file_104.jpg 

是否有可能在Linux发行版上实现?
我对Linux OS相当陌生,欢迎提供任何提示。

回答

1

使用嵌套的for循环和一些的bash脚本:

for i in {65121..75121}; do for j in {100..200}; do wget -r -P home -A jpg "http://example.com/${i}/file_${j}.jpg"; done; done 
0

Wget的具有循环

wget -nd -H -p -A file_{100..200}.jpg -e robots=off http://example.com/{65121..75121}/ 

如果只_文件{} 100..200的.jpg所以,很简单

wget -nd -H -p -A jpg -e robots=off http://example.com/{65121..75121}/ 
相关问题