linux - 在 Linux 上使用 wget 扫描特定文件的子文件夹

标签 linux wget

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

关于linux - 在 Linux 上使用 wget 扫描特定文件的子文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32876412/

相关文章:

python - 使用 dbus 连接 Connman 时出现问题,但只是第一次

python - 如何连接两个Python程序?

linux - 如何在 shell 脚本中用户输入后添加新行

php - 从外部网站获取所有脚本

curl - 在 wget 或curl 查询中使用通配符

linux - Raspberry Pi 的 Eclipse gtkmm 交叉编译,找不到文件 ft2build.h,即使它确实存在

linux - Linux 中的 OpenCl 看门狗

reactjs - wget 有效但无法从 React 应用请求

shell - 为什么 WGET 在成功之前返回 2 条错误消息?

python - 在 python 变量中获取 wget 输出