wget - 下载子目录

时间:2012-07-16 15:12:07

标签: wget

如何使用wget仅下载子目录? 我可以指定需要下载的子目录吗?

谢谢!

3 个答案:

答案 0 :(得分:66)

你可以这样做:

wget -r -l1 --no-parent http://www.domain.com/subdirectory/

其中:

-r: recursive retrieving
-l1: sets the maximum recursion depth to be 1
--no-parent: does not ascend to the parent; only downloads from the specified subdirectory and downwards hierarchy

答案 1 :(得分:8)

$ wget -m -p -E -k -K -np {URL Address}

您可以使用手册页了解选项的详细信息。

注意:使用以前的选项,将下载文件索引!

答案 2 :(得分:2)

我能够使用的好信息。我试过了:

wget -r -l1 --no-parent http://www.domain.com/subdirectory/

在包含多个文件name.subname.subname2.etc.htm或.html的网站上。为了挑选这些,我跑了:

wget -r --no-parent http://www.domain.com/subdirectory/

这很好。

相关问题