原文链接 http://blog.chinaunix.net/uid-20613650-id-3269728.html
晚上看了Linux下的curl和wget这两个工具,进行了比较和学习。
它们的区别,我看到的有如下几点:
1.curl是libcurl这个库支持的,wget是一个纯粹的命令行命令。
2.curl支持更多的协议。curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP and RTSP at the time of this writing. Wget supports HTTP, HTTPS and FTP.
3.curl 默认支持HTTP1.1(也支持1.0),而wget仅仅支持HTTP1.0规范。引用wget的man page中的一段话吧,Please be aware that Wget needs to know the size of the POST data in advance. It’s not quite clear how to work around this limitation inherent in HTTP/1.0. Although HTTP/1.1 introduces chunked transfer that doesn’t require knowing the request length in advance, a client can’t use chunked unless it knows it’s talking to an HTTP/1.1 server. And it can’t know that until it receives a response, which in turn requires the request to have been completed – a chicken-and-egg problem.
4.curl在指定要下载的链接时能够支持URL的序列或集合,而wget则不能这样;
5.wget支持递归下载,而curl则没有这个功能。(这是wget的一个主要好处,wget也是有优势的,呵呵)
相关文章
- Core中的MVC和Web API的区别和用法
- c#中 abstract 和 virtual 的区别与用法
- Java 中 关于实现字符串反转的几种操作(CharAt6、append1、reverse3、法)(用户从键盘输入一个1~999判断回文)(StringBuffer和String区别简略介绍)
- @JsonProperty和@JSONField注解的区别以及用法
- C++协程和线程的区别?详细介绍一下C++协程
- 分号与逗号的区别及举例_如何掌握分号的用法 和顿号有什么区别
- SQL 中详解round,floor,ceiling函数的用法和区别?
- `wget`是什么——命令行工具——快速下载文件(基本介绍和使用前的准备)
- Spring和SpringBoot中的@Component 和@ComponentScan注解用法介绍和注意事项
- 【linux命令讲解大全】命令解析:lsmod和losetup的用法及功能介绍