Linux wget command Download file

Source: Internet
Author: User

Wget is a Linux system used to download files of the tool, its function is more, can download a single file, can also be downloaded in sections, the following small series will be for the use of wget command to give you an example of the introduction.

Example 1: Downloading a single file

# wget http://mirror.nbrc.ac.in/CentOS/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
    • 1

This command downloads the CentOS 7 ISO file to the user's current working directory.

Example 2: Continuation of the multipart download file

There are always scenes when we start to download a large file and the Internet is disconnected. In that case, we can use the '-C ' option of the wget command to have the download resume from the breakpoint.

# wget -c http://mirror.nbrc.ac.in/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
    • 1

Example 3: Background download file

We can use the '-B ' option in the wget command to have it download files in the background.

wget -b http://mirror.nbrc.ac.in/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
    • 1

Example 4: Limit download rate

By default, the wget command tries to download at full speed, but sometimes you may be using a shared Internet, so if you try to use wget to download large files, you will slow down other users ' networks. In this case, you can avoid this if you use the '-limit-rate ' option to limit the download rate.

#wget --limit-rate=100k http://mirror.nbrc.ac.in/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
    • 1

Example 5: Download the entire site for local viewing

  # wget --mirror -p --convert-links -P./《Local-Folder》 website-url

Given

  –mirror: Turns on the option for mirroring.

  -p: Download all the necessary files to correctly display the specified HTML page.

  –convert-links: After the download is complete, convert the links in the document to be used for local viewing.

  -P ./Local-Folder: Saves all files and directories to the specified directory.

Linux wget command Download file

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.