curl vs Wget
来源:互联网 发布:百度校招面试 知乎 编辑:程序博客网 时间:2024/06/09 02:22
This document started off as a blogentry, but I decided that I should better make a permanent home for thisas I'm sure I'll get reasons to update and fix this as time goes by.
The main differences as I see them. Please consider my bias towards curl since after all, curl is my baby - but I have contributed codeto Wget as well.
Please let me know if you have other thoughts or comments on this document.Email them to me or reply on the blog entry.
- Features and is powered by libcurl - a cross-platform library witha stable API that can be used by each and everyone. This difference is majorsince it creates a completely different attitude on how to do thingsinternally. It is also slightly harder to make a library than a "mere" commandline tool.
- Pipes. curl is more in the traditionalunix-style, it sends more stuff to stdout, and reads more from stdin in a"everything is a pipe" manner.
- Return codes. curl returns a range of defined and documentedreturn codes for various (error) situations.
- Single shot. curl is basically made to do single-shot transfers ofdata. It transfers just the URLs that the user specifies, and does not containany recursive downloading logic nor any sort of HTML parser.
- More protocols. curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP,TFTP, TELNET, DICT, LDAP, LDAPS and FILE at the time of this writing. Wgetsupports HTTP, HTTPS and FTP.
- More portable. Ironically curl builds and runs on lots of moreplatforms than wget, in spite of their attempts to keep thingsconservative. For example: OS/400, TPF and other more "exotic" platforms thataren't straight-forward unix clones.
- More SSL libraries and SSL support. curl can be built with one outof four different SSL/TLS libraries, and it offers more control and widersupport for protocol details.
- curl (or rather libcurl) supports more HTTP authenticationmethods, and especially when you try over HTTP proxies.
- Bidirectional. curl offers upload and sending capabilities. Wgetonly offers plain HTTP POST support.
- HTTP multipart/form-data sending, which allows users to do HTTP "upload" and in general emulate browsers and do HTTP automation to a wider extent
- Wget is command line only. There's no lib or anything.
- Recursive! Wget's major strong side compared to curl is itsability to download recursively, or even just download everything that isreferred to from a remote resource, be it a HTML page or a FTP directorylisting.
- Older. Wget has traces back to 1995, while curl can betracked back no longer than 1997.
- Less developer activity. While this can be debated, I considerthree metrics here: mailing list activity, source code commit frequency andrelease frequency. Anyone following these two projects can see that the curlproject has a lot higher pace in all these areas, and it has indeed been sofor several years.
- HTTP 1.0. Wget still does its HTTP operations using HTTP 1.0, andwhile that is still working remarkably fine and hardly ever is troublesome tothe end-users, it is still a fact. curl has done HTTP 1.1 since March 2001(while still offering optional 1.0 requests).
- GPL. Wget is 100% GPL v3. curl is MIT licensed.
- GNU. Wget is part of the GNUproject and all copyrights are assigned to FSF. The curl project is entirely stand-aloneand independent with no organization parenting at all - with almost allcopyrights owned by Daniel.
- Wget requires no extra options to simply download a remote URL to a local file, while curl requires -o or -O. However trivial, this fact is often mentioned to me when people explain why they prefer downloading with wget.
You may argue that I should compare uploading capabilities with wput, but that's a separate tool and Idon't include that in this comparison.
For a stricter feature by feature comparison (that also compares othersimilar tools), see the curl comparisontable
Updated: February 16, 2009 18:19 (Central European, Stockholm Sweden)
- curl vs Wget
- wget VS curl
- Curl vs Wget
- wget VS curl 中英文对照
- wget curl
- linux之 wget curl
- wget 与 curl
- curl wget gzip
- curl和wget
- curl、wget命令总结
- wget与curl
- linux 下载命令 wget -curl
- curl 和 Wget 的比较
- curl 断点下载 wget下载
- wget和curl下载JDK
- curl 和 wget 抓取网页
- curl 和wget 区别 使用方法
- linux的curl和wget
- VS操作Excel文档
- jstl
- BAPI_GOODSMVT_CREATE to post Goods Movement
- Win32应用程序中进程间通信方法分析与比较
- MySQL log与slow log
- curl vs Wget
- KVM映像使用详解
- 国外开发者对于Flex Framework的总结
- 内存文件映射应用举例『转』
- VMWare映像使用详解
- Office文档在线编辑的实现之一
- 有效的艺术沟通
- 文件搜索命令
- VMware中安装Ubuntu后鼠标滚轮问题解决