Linux Learning: Curl and Wget commands

Source: Internet
Author: User

The curl and wget commands are tools under Linux that can be used to download files.

First, wget

Example 1:

wget Http://www.minjieren.com/wordpress-3.1-zh_CN.zip

The download file is saved to the current directory, and the file name defaults to the last/subsequent content of the URL, this is Wordpress-3.1-zh_cn.zip

Example 2:

Wget-o myfile Http://www.minjieren.com/wordpress-3.1-zh_CN.zip

With the-o parameter, you can specify a file name, specified here as MyFile

Example 3:

wget www.baidu.com

A index.html file is generated in the current directory

Second, Curl

Cases:

Curl-o http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-i586.tar.gz

The download file is saved to the current directory, and the file name defaults to the last/subsequent content of the URL, which is jdk-8u91-linux-i586.tar.gz.

Note that the-o parameter must be added, otherwise the file contents are displayed directly on the console.

Note: These two command tools, the Linux system is not necessarily the default, if not, you need to install. If it's under Ubuntu.

You can perform the following command to install

sudo apt-get Install Curl

Linux Learning: Curl and Wget commands

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.