Linux命令:wget

wget命令

wget命令的参数以及作用
参数作用
-p下载页面内所有资源,包括图片、视频等
-r递归下载

使用wget命令下载LinuxProbe.pdf

root@LAPTOP-HJMUH10E:/home/code# wget http://www.linuxprobe.com/docs/LinuxProbe.pdf
--2021-10-26 23:44:36--  http://www.linuxprobe.com/docs/LinuxProbe.pdf
Resolving www.linuxprobe.com (www.linuxprobe.com)... 112.19.5.225
Connecting to www.linuxprobe.com (www.linuxprobe.com)|112.19.5.225|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.linuxprobe.com/docs/LinuxProbe.pdf [following]
--2021-10-26 23:44:36--  https://www.linuxprobe.com/docs/LinuxProbe.pdf
Connecting to www.linuxprobe.com (www.linuxprobe.com)|112.19.5.225|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17676281 (17M) [application/pdf]
Saving to: ‘LinuxProbe.pdf’

LinuxProbe.pdf                100%[=================================================>]  16.86M  11.1MB/s    in 1.5s

2021-10-26 23:44:37 (11.1 MB/s) - ‘LinuxProbe.pdf’ saved [17676281/17676281]

使用wget命令递归下载www.LinuxProbe.com网站内的所有页面数以及文件

root@LAPTOP-HJMUH10E:/home/code/www.linuxprobe.com# wget -r -p http://www.LinuxProbe.com
--2021-10-27 00:03:18--  http://www.linuxprobe.com/
Resolving www.linuxprobe.com (www.linuxprobe.com)... 112.19.5.225
Connecting to www.linuxprobe.com (www.linuxprobe.com)|112.19.5.225|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.linuxprobe.com/ [following]
--2021-10-27 00:03:18--  https://www.linuxprobe.com/
Connecting to www.linuxprobe.com (www.linuxprobe.com)|112.19.5.225|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘www.linuxprobe.com/index.html’

www.linuxprobe.com/index.html                       [ <=>                                                                                                 ]  78.16K  --.-KB/s    in 0.04s

2021-10-27 00:03:18 (1.91 MB/s) - ‘www.linuxprobe.com/index.html’ saved [80036]

Loading robots.txt; please ignore errors.
--2021-10-27 00:03:18--  https://www.linuxprobe.com/robots.txt
Reusing existing connection to www.linuxprobe.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 243 [text/plain]
Saving to: ‘www.linuxprobe.com/robots.txt’

www.linuxprobe.com/robots.txt                   100%[====================================================================================================>]     243  --.-KB/s    in 0s

2021-10-27 00:03:18 (16.9 MB/s) - ‘www.linuxprobe.com/robots.txt’ saved [243/243]

--2021-10-27 00:03:18--  https://www.linuxprobe.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1
Reusing existing connection to www.linuxprobe.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 80574 (79K) [text/css]
Saving to: ‘www.linuxprobe.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1’

www.linuxprobe.com/wp-includes/css/dist/block-l 100%[====================================================================================================>]  78.69K  --.-KB/s    in 0.01s

2021-10-27 00:03:18 (7.56 MB/s) - ‘www.linuxprobe.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1’ saved [80574/80574]

--2021-10-27 00:03:18--  https://www.linuxprobe.com/wp-content/plugins/table-of-contents-plus/screen.min.css?ver=2106
Reusing existing connection to www.linuxprobe.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 1156 (1.1K) [text/css]
Saving to: ‘www.linuxprobe.com/wp-content/plugins/table-of-contents-plus/screen.min.css?ver=2106’

www.linuxprobe.com/wp-content/plugins/table-of- 100%[====================================================================================================>]   1.13K  --.-KB/s    in 0s

2021-10-27 00:03:18 (95.0 MB/s) - ‘www.linuxprobe.com/wp-content/plugins/table-of-contents-plus/screen.min.css?ver=2106’ saved [1156/1156]

--2021-10-27 00:03:18--  https://www.linuxprobe.com/wp-content/themes/zanblog2_1_0/ui/css/bootstrap.css?ver=3.0.0
Reusing existing connection to www.linuxprobe.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 127734 (125K) [text/css]
Saving to: ‘www.linuxprobe.com/wp-content/themes/zanblog2_1_0/ui/css/bootstrap.css?ver=3.0.0’

www.linuxprobe.com/wp-content/themes/zanblog2_1 100%[====================================================================================================>] 124.74K  --.-KB/s    in 0.009s

2021-10-27 00:03:18 (13.4 MB/s) - ‘www.linuxprobe.com/wp-content/themes/zanblog2_1_0/ui/css/bootstrap.css?ver=3.0.0’ saved [127734/127734]

--2021-10-27 00:03:18--  https://www.linuxprobe.com/wp-content/themes/zanblog2_1_0/ui/font-awesome/css/font-awesome.min.css?ver=4.0.1
Reusing existing connection to www.linuxprobe.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 18079 (18K) [text/css]
Saving to: ‘www.linuxprobe.com/wp-content/themes/zanblog2_1_0/ui/font-awesome/css/font-awesome.min.css?ver=4.0.1’

www.linuxprobe.com/wp-content/themes/zanblog2_1 100%[====================================================================================================>]  17.66K  --.-KB/s    in 0s

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值