赞
踩
linux命令之wget
linux命令wget用来从指定的URL下载文件。wget对网络有非常强的适应性,假设由于网络的原因下载失败,wget会不断的尝试,直到整个文件下载完毕。
wget [参数] URL
参数 | 说明 |
-O | 将文件写入指定的file |
-c | 断点续传下载文件 |
URL:下载指定的URL地址
命令:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
OR
wget https://mirrors.aliyun.com/repo/Centos-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
- [root@centos79-3 yum.repos.d]# wget https://mirrors.aliyun.com/repo/Centos-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
- --2023-09-11 16:01:15-- https://mirrors.aliyun.com/repo/Centos-7.repo
- Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 111.32.210.188, 111.32.210.193, 111.32.210.187, ...
- Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|111.32.210.188|:443... connected.
- HTTP request sent, awaiting response... 200 OK
- Length: 2523 (2.5K) [application/octet-stream]
- Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
-
- 100%[=========================================================>] 2,523 --.-K/s in 0s
-
- 2023-09-11 16:01:16 (67.3 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2523/2523]
-
- [root@centos79-3 yum.repos.d]# ls -l /etc/yum.repos.d/CentOS-Base.repo
- -rw-r--r-- 1 root root 2523 Aug 4 2022 /etc/yum.repos.d/CentOS-Base.repo
- [root@centos79-3 yum.repos.d]#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。