curl vs Wget

81 篇文章 0 订阅
curl vs Wget

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.

What both do
  • both are command line tools that can download contents from FTP, HTTP and HTTPS
  • both can send HTTP POST requests
  • both support HTTP cookies
  • both are designed to work without user interaction, like from within scripts
  • both are fully open source and free software
  • both projects were started in the 90s
How they differ
curlWget
  • 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.cURL
  • 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, FILE, POP3, IMAP, SMTP, RTMP and RTSP. Wgetonly supports HTTP, HTTPS and FTP.
  • More portable. curl builds and runs on lots of more platforms thanwget. For example: OS/400, TPF and other more "exotic" platforms that aren'tstraight-forward unix clones.
  • More SSL libraries and SSL support. curl can be built with one outof ten (10!) different SSL/TLS libraries, and it offers more control and widersupport for protocol details
  • curl supports more HTTP authentication methods, and especiallywhen you try over HTTP proxies: Basic, Digest, NTLM and Negotiate
  • curl supports lots of various SOCKS protocol versions for proxyaccess
  • 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
  • curl supports gzip and inflate Content-Encoding and does automatic decompression
  • curl offers and performs decompression of Transfer-Encoded HTTP, wget doesn't
  • curl supports http2 and it does dual-stack connects usingHappy Eyeballs.
  • curl supports metalink, wget hassupport for it coming (not yet released)
  • Much more developer activity. While this can be debated, Iconsider three metrics here: mailing list activity, source code commitfrequency and release frequency. Anyone following these two projects can seethat the curl project has a lot higher pace in all these areas, and it hasbeen so for 10+ years. Compareon ohloh.net
  • 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.A gnu head!
  • Older. Wget has traces back to 1995, while curl can betracked back no earlier than the end of 1996.
  • 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.
  • Wget supports only GnuTLS or OpenSSL for SSL/TLS support
  • Wget supports only Basic auth as the only auth type over HTTP proxy
  • Wget has no SOCKS support
  • Wget can be typed in using only the left hand on a qwerty keyboard!
Additional Stuff

Some have argued 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

Thanks

Feedback and improvements by: Micah Cowan, Olemis Lang

Updates

  • Dec 2013 - curl supports ten SSL libs, converted to a table layout
  • Jul 2012 - more SSL libs and metalink, clarify proxy auth and socks shortage in wget
  • Aug 2011 - recent wget versions do HTTP 1.1 so I removed that paragraph, added other minor differences
  • Jan 2011 - fixed the SSL library count again, added the "What both does" section
  • Apr 2010 - added more protocols, and corrected the SSL library count. Minor language fix.

Updated: April 3, 2014 15:11 (Central European, Stockholm Sweden)


http://daniel.haxx.se/docs/curl-vs-wget.html


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值