The difference and use of curl and wget

Source: Internet
Author: User

There are many overlaps between curl and wget basic functions, such as downloads.

Curl on advanced use because you can customize various request parameters so longer than the mock Web request, used to test Web page interaction (browser); wget because it supports FTP and recursive, it is longer than download for downloading files (thunderbolt).

1. Download the file

Curl-o http://man.linuxde.net/text.iso                    #O大写, no O just print content will not be downloaded
wget http://www.linuxde.net/text.iso #不用参数, download file directly

2. Download the file and rename it

Curl-o Rename.iso Http://man.linuxde.net/text.iso         #o小写
wget -o rename. zip http://www.linuxde.net/text.iso #O大写

3. Continuation of the breakpoint

Curl-o-c-url Http://man.linuxde.net/text.iso            #C大写
wget -C http://www.linuxde.net/text.iso #c小写

4. Speed Limit Download

Curl--limit-rate 50k-o http://Man.linuxde.net/text.iso
wget--limit-rate=50k http://www.linuxde.net/text.iso

5. Display the response header information

Curl-i http://Man.linuxde.net/text.iso
wget--server-response Http://www.linuxde.net/test.iso

6.wget Weapon--Package download website

wget--mirror-p--convert-links-p/var/www/html http://man.linuxde.net/

Reference:

Http://man.linuxde.net/curl

Http://man.linuxde.net/wget

https://www.zhihu.com/question/19598302

The difference and use of curl and wget

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.