在 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 OS 的新手,欢迎任何提示。
使用嵌套 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}/
使用 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 OS 的新手,欢迎任何提示。
使用嵌套 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}/