Get the App
SLTechnology News&Howtos  ›  Servers  › 

A brief introduction to the Linux download tools wget and axel

Shulou Source: shulou.com Published: 2022-06-01 13:01:15 10月02日 Update

This article introduces the relevant knowledge of "brief introduction of Linux download tools wget and axel". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Wget

Wget is a very common command line download tool. The format of Wget is as follows:

# wget [option] [download address]

Common parameters of Wget

-b: download in the background. Wget downloads files to the current directory by default.

-O: download the file to the specified directory.

-P: specify the directory where the file is saved.

-N:don't re-retrieve files unless newer than

-t: the number of attempts to connect, and the number of attempts to connect when Wget cannot establish a connection with the server.

-c: the breakpoint resumes. If the download is interrupted, the download will start from the last breakpoint when the connection is restored.

In addition, Wget can also download the entire website, such as downloading the entire Man manual center of http://man.chinaunix.net.

Simply enter the following command: # wget-r-p-np-k http://man.chinaunix.net, where the-r parameter refers to the use of recursive download

-p refers to downloading all the files needed to display the full web page, such as pictures, etc.-np refers to not searching the upper directory, and-k refers to converting absolute links into relative links.

AXEL

The global configuration file of axel is / etc/axel/axelrc, you can customize axel as needed. For example, I uncommented alternate_output = 1 line to make the output of axel more concise. You can also set the number of threads used by axel in this file. The default is 4 threads.

It is easy to use axel url.

Speed limit: add the-s parameter, such as-s 10240, that is, the number of bytes downloaded per second, here is 10 Kb

Limit the number of connections: add the-n parameter, such as-n 5, to open 5 connections.

This is the end of the brief introduction to the Linux download tools wget and axel. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Files parameters directories download tools tools content commands frequently used file downloads breakpoints more knowledge threads websites links attempts output practical concise learned Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno Shulou Tech Info MySQL Apple