使用CUrl断点续传下载Linux内核5.6.2源码

首先进入Linux的祖宗网站;如下图;www.kernel.org;

看一下当前最新版本为5.6.2;最早可以看到版本3.16.82;再早似乎一时找不到;下载;

非常慢;此网站下载人巨多;

它还有几个看上去是类似站点,GIT、RSYNC的,打开以后看了一阵没看明白;

据说此站点,开源软件的一个镜像站点,可以下;比较快;不过一时没找见;

https://mirror.tuna.tsinghua.edu.cn

从www.kernel.org下很慢;有时下载失败,又从头来;

考虑使用CUrl工具下载;还是慢;但是CUrl支持断点续传;这样断了也可以继续;最终可以下载下来;

全部CMD操作如下;

Microsoft Windows [版本 10.0.17763.1098]
(c) 2018 Microsoft Corporation。保留所有权利。

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -o https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  3  106M    3 3550k    0     0  10^C4      0  3:01:30  0:05:54  2:55:36 12034
D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -C - -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  6  106M    6 7148k    0     0   6241      0  4:58:29  0:19:32  4:38:57  2456
curl: (18) transfer closed with 104456667 bytes remaining to read

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -C - -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
** Resuming transfer from byte position 7319621
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  7 99.6M    7 7504k    0     0   6943      0  4:10:44  0:18:26  3:52:18  1041
curl: (18) transfer closed with 96772033 bytes remaining to read

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -C - -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
** Resuming transfer from byte position 15004255
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 19 92.2M   19 18.4M    0     0   9894      0  2:43:00  0:32:35  2:10:25  2616
curl: (18) transfer closed with 77425111 bytes remaining to read

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>curl -C - -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
** Resuming transfer from byte position 34351177
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 73.8M  100 73.8M    0     0  11044      0  1:56:50  1:56:50 --:--:-- 12408

D:\网络应用软件\curl-7.69.1_1-win64-mingw\curl-7.69.1-win64-mingw\bin>

命令如下;

curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz
curl -C - -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz

第二条是断点续传;-O要大写;-C和-O之间有个短横线;

下载完成之后如下;

发布了475 篇原创文章 · 获赞 545 · 访问量 304万+

猜你喜欢

转载自blog.csdn.net/bcbobo21cn/article/details/105354574
今日推荐