Linux基础——下载工具(wget、curl、git)

一、curl下载

curl -C- -fLO  https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
# 下载文件到当前位置
curl -O  https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
# 显示下载进度

[root@k8s-master tmp]# curl -# -O https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
######################################################################################################################################### 100.0%

 

二、wget下载

# 下载到指定目录(-O)
wget
-O /tmp/111.rpm https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
# 断电续传(-c)
wget -c -O /tmp/111.rpm  https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
# 后台下载(-b)
wget -b -c -O /tmp/111.rpm  https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/openssh-8.2p1-29.oe2003sp4.x86_64.rpm
# 下载进度

[root@k8s-master tmp]# tail -f wget-log


0K .......... .......... .......... .......... .......... 17% 5.77M 0s
50K .......... .......... .......... .......... .......... 35% 11.5M 0s
100K .......... .......... .......... .......... .......... 53% 10.6M 0s
150K .......... .......... .......... .......... .......... 71% 12.2M 0s
200K .......... .......... .......... .......... .......... 89% 13.4M 0s
250K .......... .......... ......... 100% 8.66M=0.03s


2024-12-03 12:23:53 (9.64 MB/s) - ‘/tmp/111.rpm’ saved [286380/286380]

# 镜像yum源目录结构及rpm文件(-mirrors)
wget -mirrors https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/
# 网站连接是否正常
wget --spider https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/
# 测试模拟下载响应情况
 wget -S https://mirrors.cmecloud.cn/bclinux/oe21.10/cr/update/x86_64/Packages/

 

posted on 2024-12-03 15:47  gkhost  阅读(570)  评论(0)    收藏  举报

导航