Wget 排除域不起作用
Wget exclude domains does not work
我需要复制我的网站。现在,我正在使用 [官方网站][1] 上提供的说明来排除某些网址。
这是 wget 命令:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--html-extension --mirror -P /path/to/folder --no-parent -e
--exclude-domains http://www.external-domain.com/
robots=off http://my-domain.com
我也试过这个代码:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--html-extension --mirror -P /path/to/folder --no-parent -e
--exclude-domains=http://www.external-domain.com/
robots=off http://my-domain.com
我收到以下错误 - wget: Invalid --execute command --exclude-domains'
。那么,如何排除不需要复制的域?
对不起,我不知道选项的位置很重要,所以我把它改成了这样:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--exclude-domains www.external-domain.com --html-extension --mirror
-P /path/to/my/folder --no-parent -e robots=off www.my-domain.com
它开始工作了。
我需要复制我的网站。现在,我正在使用 [官方网站][1] 上提供的说明来排除某些网址。
这是 wget 命令:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--html-extension --mirror -P /path/to/folder --no-parent -e
--exclude-domains http://www.external-domain.com/
robots=off http://my-domain.com
我也试过这个代码:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--html-extension --mirror -P /path/to/folder --no-parent -e
--exclude-domains=http://www.external-domain.com/
robots=off http://my-domain.com
我收到以下错误 - wget: Invalid --execute command --exclude-domains'
。那么,如何排除不需要复制的域?
对不起,我不知道选项的位置很重要,所以我把它改成了这样:
/usr/bin/wget --no-host-directories -U Mozilla --recursive
--page-requisites --restrict-file-names=windows --convert-links
--exclude-domains www.external-domain.com --html-extension --mirror
-P /path/to/my/folder --no-parent -e robots=off www.my-domain.com
它开始工作了。