2015-09-30 42 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}/ 
相關問題