如何使用wget下载整个目录和子目录?

code4fun:

我正在尝试使用来下载项目的文件,因为该项目wget的SVN服务器不再运行,并且只能通过浏览器访问文件。所有文件的基本URL都一样

http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/ *

如何使用wget(或任何其他类似工具)下载此存储库中的所有文件,其中“ tzivi”文件夹是根文件夹,并且在其下有几个文件和子文件夹(最多2或3个级别)?

user2936450:

您可以在shell中使用它:

wget -r --no-parent http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/

参数为:

-r     //recursive Download

--no-parent // Don´t download something from the parent directory

如果您不想下载全部内容,则可以使用:

-l1 just download the directory (tzivi in your case)

-l2 download the directory and all level 1 subfolders ('tzivi/something' but not 'tivizi/somthing/foo')  

等等。如果不插入任何-l选项,wget-l 5自动使用

如果插入一个-l 0wget则将下载整个Internet,因为它将跟随它找到的每个链接。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章