Prevent wget from recursing into excluded directories

I have mirrored files on a remote Windows server over http using the following wget command on a Mac:

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

This worked fine.

Now, some of the directories on the server have files that will never change. I don't want wget to bother recursing into those directories. There are thousands of files in these directories and it's a waste of time to check their timestamp. I'm trying to exclude these directories like so:

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

But despite excluding the two directories, wget still dives down into them and checks the timestamp for every file in every directory and subdirectory of the excluded directories.

I've tried many different iterations of wildcards and escaping and quoting/no quoting and so forth but without success.


To get this working, I had to start the path from the root. So, for example:

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

链接地址: http://www.djcxy.com/p/57162.html

上一篇: 为什么wc实用程序会用“total”生成多行?

下一篇: 防止wget递归到排除的目录中