假设我有通过httpË访问的目录,G我可以使用wget从Linux终端下载多个文件
Http://www.abc.com/pdf/books
我有文件夹里的许多PDF文件
我可以使用的东西像
wget http://www.abc.com/pdf/books/ *
假设我有通过httpË访问的目录,G我可以使用wget从Linux终端下载多个文件
Http://www.abc.com/pdf/books
我有文件夹里的许多PDF文件
我可以使用的东西像
wget http://www.abc.com/pdf/books/ *
wget -r -l1 -A.pdf http://www.abc.com/pdf/books
从wget的手册页:
Wget can follow links in HTML and XHTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as ``recursive downloading.'' While doing that, Wget respects the Robot Exclusion Standard (/robots.txt). Wget can be instructed to convert the links in downloaded HTML files to the local files for offline viewing.
和
Recursive Retrieval Options
-r
--recursive
Turn on recursive retrieving.
-l depth
--level=depth
Specify recursion maximum depth level depth. The default maximum depth is 5.
这取决于网络服务器和服务器的配置。严格来说,URL不是一个目录路径,所以http://something/books/*
是没有意义的。
但是如果Web服务器实现的http://something/books
路径是上市网站上所有的图书索引页面,那么你就可以玩的recursive option和蜘蛛的选择和wget会很乐意跟着这在任何链接http://something/books
索引页面。
这只适用于'http:// www.abc.com/pdf/books'导致包含指向PDF文件链接的页面。 – Job
暗示:“假设我有一个可通过http_访问的_directory”。如果Web服务器没有为图像文件夹启用目录浏览,则此方法将失败,是的。 – merryprankster