如何使用wget下载整个目录和子目录? [英] How to download an entire directory and subdirectories using wget?

查看:2950
本文介绍了如何使用wget下载整个目录和子目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to download the files for a project using wget, as the SVN server for that project isn't running anymore and I am only able to access the files through a browser. The base URLs for all the files is the same like

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

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

How can I use wget (or any other similar tool) to download all the files in this repository, where the "tzivi" folder is the root folder and there are several files and sub-folders (upto 2 or 3 levels) under it?

推荐答案

您可以在shell中使用它:

You may use this in 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

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

If you don't want to download the entire content, you may use:

-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.

And so on. If you insert no -l option, wget will use -l 5 automatically.

如果插入-l 0,则将下载整个Internet,因为wget会跟踪找到的每个链接.

If you insert a -l 0 you´ll download the whole Internet, because wget will follow every link it finds.

这篇关于如何使用wget下载整个目录和子目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆