【发布时间】: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