[英]Find specific parent folder and delete files inside sub-folders in Linux
[英]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.