11.24 分享一款linux多線程下載工具--axel

概述

運維工作中,常常需要下載文件,因為網站下載速度限制或者網絡等原因導致下載讓人無法忍受,所以今天推薦這款多線程下載工具--axel,下載文件時可以替代curl、wget。

Axel tries to accelerate the download process by using multiple connections per file, and can also balance the load between different servers.

Axel tries to be as light as possible, so it might be useful on byte-critical systems.

Axel supports HTTP, HTTPS, FTP and FTPS protocols.

github:https://github.com/axel-download-accelerator/axel


一、centos7.x安裝

CentOS 的 yum 中本來是不包含 axel 這個軟件包的,如果要使用需要先添加 epel 拓展

yum -y install epel-release 
yum -y install axel
分享一款linux多線程下載工具--axel


二、語法

axel [options] url1 [url2] [url...]

選項

--max-speed=x , -s x 最高速度x
--num-connections=x , -n x 連接數x
--output=f , -o f 下載為本地文件f
--search[=x] , -S [x] 搜索鏡像
--header=x , -H x 添加頭文件字符串x(指定 HTTP header)
--user-agent=x , -U x 設置用戶代理(指定 HTTP user agent)
--no-proxy , -N 不使用代理服務器
--quiet , -q 靜默模式
--verbose ,-v 更多狀態信息
--alternate , -a Alternate progress indicator
--help ,-h 幫助
--version ,-V 版本信息

三、實例

如果我要從 Thunderbird 的官方網站下載一個最新版本的 Thunderbird 二進制包,那麼我們就可以使用 axel 來下載。

在我們獲得了下載地址之後執行:

 axel -n 10 -o /axel/ -a https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/45.2.0/linux-x86_64/zh-CN/thunderbird-45.2.0.tar.bz2

axel 將會按照我設置的10個線程來下載 Thunderbird

分享一款linux多線程下載工具--axel

如果下載過程中下載中斷可以再執行下載命令即可恢復上次的下載進度。

分享一款linux多線程下載工具--axel


覺得有用的朋友多幫忙轉發哦!後面會分享更多devops和DBA方面的內容,感興趣的朋友可以關注下~

分享一款linux多線程下載工具--axel


分享到:


相關文章: