簡體   English   中英

在Linux上使用wget掃描子文件夾中的特定文件

[英]Using wget on Linux to scan sub-folders for specific files

使用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

例子):

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操作系統的新手,歡迎提供任何提示。

使用嵌套的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

Wget有循環

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

如果只有file_ {100..200} .jpg,那就更簡單了

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM