小编imb*_*ago的帖子

通过 wget 下载目录和子目录

我在网络上有一个带有文件夹视图的文件夹(http://example.com/folder1/folder2/

/folder2 有多个文件夹,其中包含 pdf 文件。我想通过 ssh 将 /folder2 的所有内容下载到我的服务器,包括使用 wget 的所有子文件夹和文件。我已经尝试了以下但我一直只得到一个 index.html 和 robots.txt 文件。

[root@myserver downloads]# wget -r --no-parent --reject "index.html*" http://www.example.com/folder1/folder2/
--2015-08-07 07:46:36--  http://www.example.com/folder1/folder2/
Resolving www.example.com... 192.168.1.1
Connecting to www.example.com|192.168.1.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `www.example.com/folder1/folder2/index.html'

    [         <=>                           ] 4,874,325    138K/s   in 37s     

2015-08-07 07:47:42 (128 KB/s) -     `www.example.com/folder1/folder2/index.html' saved [4874325]

Loading robots.txt; please ignore errors.
--2015-08-07 07:47:42--  http://www.example.com/robots.txt
Connecting to www.example.com|192.168.1.1|:80... connected.
HTTP request sent, awaiting response... …
Run Code Online (Sandbox Code Playgroud)

linux ssh bash wget

3
推荐指数
1
解决办法
7561
查看次数

标签 统计

bash ×1

linux ×1

ssh ×1

wget ×1