gpt4 book ai didi

wget - 无法使用 --no-clobber 恢复 "wget --mirror"(-c -F -B 无用)

转载 作者:行者123 更新时间:2023-12-03 07:06:15 25 4
gpt4 key购买 nike

我使用“wget --mirror [sitename]”启动了一个 wget 镜像,它是工作正常,但意外中断了该过程。

我现在想恢复镜像,但有以下警告:

  • 如果 wget 已经下载了一个文件,我不想下载它再来一次。我什至不想让 wget 检查时间戳:我知道我拥有的版本“足够新”。

  • 确实希望 wget 读取它已经下载的文件并且点击这些文件内的链接。

我可以对上面的第一点使用“-nc”,但我似乎无法强制wget 读取已下载的文件。

我尝试过的事情:

  • 明显的“wget -c -m”不起作用,因为它想要比较时间戳,这需要至少发出一个 HEAD 请求到远程服务器。

  • “wget -nc -m”不起作用,因为 -m 意味着 -N,而 -nc 是与-N 不兼容。

  • “wget -F -nc -r -l inf”是我能想到的最好的,但它仍然失败。我希望“-F”能强制 wget 阅读本地内容,已经下载的文件为 HTML,因此可以点击链接,但是这似乎没有发生。

  • 我尝试了一些其他选项(例如“-c”和“-B [站点名称]”),但是没有任何效果。

如何让 wget 恢复此镜像?

最佳答案

显然这有效:

Solved: Wget error “Can’t timestamp and not clobber old files at the same time.” Posted on February 4, 2012 While trying to resume a site-mirror operation I was running through Wget, I ran into the error “Can’t timestamp and not clobber old files at the same time”. It turns out that running Wget with the -N and -nc flags set at the same time can’t happen, so if you want to resume a recursive download with noclobber you have to disable -N. The -m attribute (for mirroring) intrinsically sets the -N attribute, so you’ll have to switch from -m to -r in order to use noclobber as well.

来自:http://www.marathon-studios.com/blog/solved-wget-error-cant-timestamp-and-not-clobber-old-files-at-the-same-time/

关于wget - 无法使用 --no-clobber 恢复 "wget --mirror"(-c -F -B 无用),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13092229/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com