【问题标题】:Prevent wget from recursing into excluded directories防止 wget 递归到排除目录
【发布时间】:2016-01-08 17:51:41
【问题描述】:

我在 Mac 上使用以下 wget 命令通过 http 在远程 Windows 服务器上镜像文件:

wget --execute="robots = off" --mirror -N --no-parent -R '*index.html*' convert-links  -nH --cut-dirs=1 http://user:pass@domain.com/share/?C=M;O=D

这很好用。

现在,服务器上的某些目录具有永远不会更改的文件。我不希望wget 麻烦递归到这些目录中。这些目录中有数千个文件,检查它们的时间戳是浪费时间。我正在尝试像这样排除这些目录:

wget --exclude-directories='*1. Council Meetings*,*3. Council Minutes*' --execute="robots = off" --mirror -N --no-parent -R '*index.html*' convert-links  -nH --cut-dirs=1 http://user:pass@domain.com/share/?C=M;O=D

但是尽管排除了这两个目录,wget 仍然深入其中并检查排除目录的每个目录和子目录中的每个文件的时间戳。

我尝试了许多不同的通配符迭代以及转义和引用/不引用等等,但没有成功。

【问题讨论】:

    标签: admin wget download mirror server-administration


    【解决方案1】:

    为了让它工作,我必须从根目录开始。所以,例如:

    --exclude-directories='/root/stuff/*1. Council Meetings*

    【讨论】:

    • 当它是一个网站时,你从根目录是什么意思?你能准确地写你的例子吗?
    猜你喜欢
    • 2016-06-16
    • 1970-01-01
    • 2015-05-21
    • 2020-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-16
    • 2014-05-12
    相关资源
    最近更新 更多