Axel – A Lightweight Command Line Download Accelerator For Linux

4) Limit the Connections

By default axel establish 4 connection to get the file from different mirrors. Additionally we can boost the download speed by adding more connection with -n option followed by connections count 8. We have added eight connection for safer side but unfortunately it took much time to get the file downloaded.

# axel -n 10 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Initializing download: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
Starting download

[  0%]  .......... .......... .......... .......... ..........  [ 140.8KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 265.7KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 305.4KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 402.1KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 496.3KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 522.1KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 567.5KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 640.5KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 710.8KB/s]
[  2%]  .......... .......... .......... .......... ..........  [ 780.5KB/s]
.
.
[ 98%]  .......... .......... .......... .......... ..........  [7544.9KB/s]
[ 98%]  .......... .......... .......... .......... ..........  [7557.9KB/s]
[ 98%]  .......... .......... .......... .......... ..........  [7570.4KB/s]
[ 98%]  .......... .......... .......... .......... ..........  [7495.3KB/s]
[ 99%]  .......... .......... .......... .......... ......
Connection 2 finished
        ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,....  [7311.6KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [7318.9KB/s]
[ 99%]  .......... .......... .......... .......... ..........
Connection 9 finished
        ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,,  [7331.0KB/s]
[ 99%]  .......... .......... .......... ..........
Connection 3 finished
        ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ..........  [4300.7KB/s]
[100%]  .......... .......... .......... .......... ......

Downloaded 21.6 megabytes in 5 seconds. (4109.41 KB/s)

5) Resume Incomplete download

By default axel have the behavior of Resume Incomplete download. Axel used to update the state file (.st extension) regularly while downloading the file. Due to some reason, the download get hang in middle ? don’t worry, just use the same axel command which will check file & file.st, if found, download is resumed where it stopped.

# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Initializing download: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
Starting download

[  0%]  .......... .......... .......... .......... ..........  [ 140.8KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 265.7KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 305.4KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 402.1KB/s]
[  0%]  .......... .......... .......... .......... ..........  [ 496.3KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 522.1KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 567.5KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 640.5KB/s]
[  1%]  .......... .......... .......... .......... ..........  [ 710.8KB/s]
[  2%]  .......... .......... .......... .......... ..........  [ 780.5KB/s]
.
.
[ 84%]  .......... .......... .......... .......... ..........  [7100.7KB/s]
[ 84%]  .......... .......... .......... .......... ..........  [7104.3KB/s]
[ 84%]  .......... .......... .......... .^C

Downloaded 18.3 megabytes in 2 seconds. (7009.79 KB/s)

The following output clearly showing two files owncloud-9.0.0.tar.bz2 & owncloud-9.0.0.tar.bz2.st when we disconnect the download. When re initiating the download again, it starts exactly where it stopped before.

# ls -lh
total 19M
-rw------- 1 root root 22M Dec 27 08:33 owncloud-9.0.0.tar.bz2
-rw------- 1 root root  44 Dec 27 08:33 owncloud-9.0.0.tar.bz2.st

# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Initializing download: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
State file found: 19180828 bytes downloaded, 3497380 to go.
Starting download

        ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,......... ..........  [  66.5KB/s]
[ 84%]  .......... .......... .......... .......... ..........  [ 186.0KB/s]
[ 85%]  .......... .......... .......... .......... ..........  [ 241.7KB/s]
[ 85%]  .......... .......... .......... .......... ..........  [ 335.6KB/s]
[ 85%]  .......... .......... .......... .......... ..........  [ 351.5KB/s]
[ 85%]  .......... .......... .......... .......... ..........  [ 427.1KB/s]
[ 85%]  .......... .......... .......... .......... ..........  [ 427.4KB/s]
[ 86%]  .......... .......... .......... .......... ..........  [ 491.5KB/s]
.
.
[ 98%]  ...
Connection 0 finished
        ,,,....... .......... .......... .......... ..........  [2106.6KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [2140.5KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [2172.4KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [2203.2KB/s]
[ 99%]  .......... .......... .......... .......... ..........  [2236.2KB/s]
[100%]  .......... .......... .......... .......... ......

Downloaded 3415.4 kilobytes in 1 second. (2264.93 KB/s)

6) Get the file without progress

If you don’t want to see the file download progress, simply add -q option with axel command.

# axel -q https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2

7) Alternate progress indicator

If you don’t like the default progress bar, you can use alternate progress indicator by adding -a option with axel command.

# axel -a https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Initializing download: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
Starting download

[ 66%] [......0      ...1        ..........2  ...........3] [   5.8MB/s] [00:01]^C

Downloaded 14.3 megabytes in 2 seconds. (5916.11 KB/s)

We have interrupted the above download to show you the alternate progress indicator status clearly while downloading the file. Once the file get downloaded successfully you can see the same output like below.

# axel -a https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
Starting download

Connection 2 finished                                                          ]
Connection 1 finished                                                          ]
Connection 3 finished                                                          ]
Connection 0 finished                                                          ]

Downloaded 21.6 megabytes in 4 seconds. (5062.32 KB/s)

8) Read more about axel

If you want to know more option which is available for axel, simply navigate to man page.

# man axel
or
# axel --help

Enjoy…)

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

One Comment on “Axel – A Lightweight Command Line Download Accelerator For Linux”

  1. I’m trying to use axel downloader to download Gapps from the official site but it has no specific download link for the target files i want. Any help will be great

Leave a Reply

Your email address will not be published. Required fields are marked *