当前位置:网站首页>wget命令使用
wget命令使用
2022-06-11 15:43:00 【GuochaoHN】
语法
wget(选项)(参数)
选项
-a<日志文件>:在指定的日志文件中记录资料的执行过程;
-A<后缀名>:指定要下载文件的后缀名,多个后缀名之间使用逗号进行分隔;
-b:进行后台的方式运行wget;
-B<连接地址>:设置参考的连接地址的基地地址;
-c:继续执行上次终端的任务;
-C<标志>:设置服务器数据块功能标志on为激活,off为关闭,默认值为on;
-d:调试模式运行指令;
-D<域名列表>:设置顺着的域名列表,域名之间用“,”分隔;
-e<指令>:作为文件“.wgetrc”中的一部分执行指定的指令;
-h:显示指令帮助信息;
-i<文件>:从指定文件获取要下载的URL地址;
-l<目录列表>:设置顺着的目录列表,多个目录用“,”分隔;
-L:仅顺着关联的连接;
-r:递归下载方式;
-nc:文件存在时,下载文件不覆盖原有文件;
-nv:下载时只显示更新和出错信息,不显示指令的详细执行过程;
-q:不显示指令执行过程;
-O:下载并以指定的文件名保存;
-nh:不查询主机名称;
-v:显示详细执行过程;
-V:显示版本信息;
--passive-ftp:使用被动模式PASV连接FTP服务器;
--follow-ftp:从HTML文件中下载FTP连接文件。
参数
URL:下载指定的URL地址。
其中 -O:下载并以指定的文件名保存
wget -O wordpress.zip http://www.linuxde.net/download.aspx?id=1080
wget默认会以最后一个符合/的后面的字符来命名,对于动态链接的下载通常文件名会不正确。
*错误:下面的例子会下载一个文件并以名称download.aspx?id=1080保存:
wget http://www.linuxde.net/download?id=1
即使下载的文件是zip格式,它仍然以download.php?id=1080命名。
*正确:为了解决这个问题,我们可以使用参数-O来指定一个文件名:
wget -O wordpress.zip http://www.linuxde.net/download.aspx?id=1080
*特殊的:
-O file(--output-document=file)
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally named -.)
表示:wget 会把url中获取的数据统一写入 '-O' 指定的file中。
wget -O-以'-'作为file参数,那么数据将会被打印到标准输出,通常为控制台。
wget -O ./-以'./-'作为file参数,那么数据才会被输出到名为'-'的file中。
边栏推荐
- Understand the dense support functions / stored procedures of opengauss
- Opengauss enterprise installation
- 导入数据:gs_restore or MERGE INTO? 看看哪款更适合你
- 2022年软件测试的前景如何?需不需要懂代码?
- [Yugong series] June 2022 Net architecture class 078 worker cluster of distributed middleware schedulemaster
- How to manage concurrent write operations? Get you started quickly
- 前沿科技探究之AI功能:慢SQL发现
- 使用gsql连接数据库
- Application of AI in index recommendation
- Verification code is the natural enemy of automation? Ali developed a solution
猜你喜欢

【愚公系列】2022年06月 .NET架构班 076-分布式中间件 ScheduleMaster的执行原理

The third generation Pentium B70 won the C-NCAP five-star safety performance again
![[系统安全] 四十二.Powershell恶意代码检测系列 (4)论文总结及抽象语法树(AST)提取](/img/d9/67ad40ba63de8006b67e51b0c82a84.png)
[系统安全] 四十二.Powershell恶意代码检测系列 (4)论文总结及抽象语法树(AST)提取
![[system safety] XLII PowerShell malicious code detection series (4) paper summary and abstract syntax tree (AST) extraction](/img/d9/67ad40ba63de8006b67e51b0c82a84.png)
[system safety] XLII PowerShell malicious code detection series (4) paper summary and abstract syntax tree (AST) extraction

Tianjin Port coke wharf hand in hand map flapping software to visually unlock the smart coke port

Learn how to parse SQL from kernel code

测试9年,面试华为要薪1万,华为员工:公司没这么低工资的岗

【0006】title、关键字及页面描述

Verification code is the natural enemy of automation? Ali developed a solution

从内核代码了解SQL如何解析
随机推荐
拿到20K我用了5年,面了所有大厂,这些高频面试问题都帮你们划出来啦
Take you in-depth understanding of AGC cloud database
数据库资源负载管理(上篇)
调代码最离谱错误合集
数据库设计建议
Kaixia takes the lead in launching a new generation of UFS embedded flash memory devices that support Mipi m-phy v5.0
YEF 2022昨日开幕,多网络平台全程免费直播,开启在线技术盛宴!
Using cloud DB to build apps quick start - quick games
uniapp滚动条置顶实现
使用Cloud DB构建APP 快速入门-快游戏篇
Methodology and practice of real-time feature computing platform architecture
openGauss 多线程架构启动过程详解
如何管理并发写入操作?带你快速上手
[Yugong series] June 2022 Net architecture class 076- execution principle of distributed middleware schedulemaster
DB4AI: 数据库驱动AI
The research results of Professor xuweixin from the school of atmosphere of Sun Yat sen University on extreme precipitation caused by weak convection were reported by science highlights
The most egregious error set of tone codes
[系统安全] 四十二.Powershell恶意代码检测系列 (4)论文总结及抽象语法树(AST)提取
openGauss AI能力升级,打造全新的AI-Native数据库
Frontier technology exploration deepsql: in Library AI algorithm