默认情况下,wget -r 将目录下载为directoryname.html。我希望将其下载到目录名/index.html
所以代替:
index.html
contact.html
support.html
我想要:
index.html
contact/index.html
support/index.html
这可以用 wget 实现吗?
最佳答案
当我想要镜像我使用的网站时:
$ wget -m -E -nH -np --cut-dirs=2 http://site/a/b/
这样目录“b”下的所有内容都会被下载。如果您的目标目录处于不同级别,则需要相应地调整 --cut-dirs。
关于linux - wget 递归文件夹结构,树中包含多个 index.html 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12252068/