我正在尝试使用 wget
下载项目的文件,因为该项目的 SVN 服务器不再运行,我只能通过浏览器访问这些文件。所有文件的基本 URL 都相同,如
http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/*
如何使用 wget
(或任何其他类似工具)下载此存储库中的所有文件,其中“tzivi”文件夹是根文件夹,并且有多个文件和子文件夹(最多2或3级)在它下面?
最佳答案
你可以在 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 0
,您将下载整个 Internet,因为 wget
将跟随它找到的每个链接。
https://stackoverflow.com/questions/17282915/