mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-10 22:21:11 +08:00
translated
This commit is contained in:
parent
3fb313ded9
commit
48b83ac7c8
@ -1,48 +1,46 @@
|
||||
translating---geekpi
|
||||
|
||||
Speed up your downloads with Axel command line downloader/accelerator
|
||||
使用 Axel 命令行下载器/加速器加速你的下载
|
||||
============================================================
|
||||
|
||||
[Axel][7] is a lightweight download utility, it does the same thing how other accelerator does. It opens multiple connections for one file and each connections download separate file fragment to complete the download more quickly.
|
||||
[Axel][7] 是一个轻量级下载程序,它如其他加速器那样做着同样的事情。它为一个文件打开多个连接,每个连接下载单独的文件片段以更快地完成下载。
|
||||
|
||||
Axel supports HTTP, HTTPS, FTP and FTPS protocols. It can also use multiple mirrors for single file download. So, Axel can speed up a download up to 40% (approximately, i personally realized). It’s very lightweight because no dependencies and uses very less CPU & RAM.
|
||||
Axel支持 HTTP】HTTPS、FTP和 FTPS 协议。它也可以使用多个镜像下载单个文件。所以,Axel 可以加速下载高达 40%(大约,我个人认为)。它非常轻量级,因为它没有依赖并且使用非常少的 CPU 和 RAM。
|
||||
|
||||
Axel downloads all the data directly to the destination file, using one single thread.
|
||||
Axel 使用一个单线程将所有数据直接下载到目标文件。
|
||||
|
||||
Note : There is no option to download the two file in single command
|
||||
注意:没有选项可以在单条命令中下载两个文件
|
||||
|
||||
You can also try alternative Command Line Download Managers/Accelerators
|
||||
你还可以尝试其他命令行下载管理器/加速器
|
||||
|
||||
* [aria2 – The ultra fast download utility][1]
|
||||
* [wget – Standard command line download utility][2]
|
||||
* [curl – command line download utility][3]
|
||||
* [Best 4 Command Line Download Managers/Accelerators for Linux][4]
|
||||
* [[aria2 - 超快速下载程序] [1]
|
||||
* [[wget - 标准命令行下载程序] [2]
|
||||
* [[curl - 命令行下载程序] [3]
|
||||
* [[Linux 下的最好的 4 个命令行下载管理器/加速器] [4]
|
||||
|
||||
Most of the distribution (Debian, Ubuntu, Mint, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, etc.) has the axel package so we can easily install it from distribution official repository. For CentOS/RHEL we need to enable [EPEL Repository][5].
|
||||
大多数发行版(Debian、Ubuntu、Mint、Fedora、suse、openSUSE、Arch Linux、Manjaro、Mageia等)都有 axel 包,所以我们可以从发行版官方仓库轻松安装。对于CentOS/RHEL,我们需要启用[EPEL Repository][5]。
|
||||
|
||||
```
|
||||
[Install Axel on Debian/Ubuntu/LinuxMint]
|
||||
[在 Debian/Ubuntu/LinuxMint 上安装 Axel]
|
||||
$ sudo apt-get install axel
|
||||
|
||||
[Install Axel on RHEL/CentOS]
|
||||
[在 RHEL/CentOS 上安装 Axel]
|
||||
$ sudo yum install axel
|
||||
|
||||
[Install Axel on Fedora]
|
||||
[在 Fedora 上安装 Axel]
|
||||
$ sudo dnf install axel
|
||||
|
||||
[Install Axel on openSUSE]
|
||||
[在 openSUSE 上安装 Axel]
|
||||
$ sudo zypper install axel
|
||||
|
||||
[Install Axel on Mageia]
|
||||
[在 Mageia 上安装 Axel]
|
||||
$ sudo urpmi axel
|
||||
|
||||
[Install Axel on Arch Linux based system]
|
||||
[在基于 Arch Linux 的发行版安装 Axel]
|
||||
$ sudo pacman -S axel
|
||||
```
|
||||
|
||||
#### 1) Download Single File
|
||||
#### 1) 下载单个文件
|
||||
|
||||
The below command will download the file from given URL and stores in current directory, while downloading the file we can see the (No of connection established, download speed, download progress, how much time it took to complete the download & where connection finished) of file.
|
||||
以下命令将从给定的 URL 下载文件并存储在当前目录中,而下载文件时,我们可以看到文件的信息(建立的连接数、下载速度、下载进度、完成下载所花费的时间以及连接完成的时间)。
|
||||
|
||||
```
|
||||
# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -76,9 +74,9 @@ Connection 1 finished
|
||||
Downloaded 21.6 megabytes in 3 seconds. (5755.94 KB/s)
|
||||
```
|
||||
|
||||
#### 2) Save the file with different name
|
||||
#### 2) 用不同的名称保存文件
|
||||
|
||||
You can save the file with different name while initiate downloading by adding -o (lowercase) option followed by file name. Here we are going to save the filename with owncloud.tar.bz2.
|
||||
你可以通过添加 -o(小写)选项和文件名来启动下载,并使用其他名称来保存文件。这里我们使用 owncloud.tar.bz2 作为保存文件名。
|
||||
|
||||
```
|
||||
# axel -o cloud.tar.bz2 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -114,9 +112,9 @@ Connection 1 finished
|
||||
Downloaded 21.6 megabytes in 3 seconds. (6001.05 KB/s)
|
||||
```
|
||||
|
||||
#### 3) Limit download speed
|
||||
#### 3) 限制下载速度
|
||||
|
||||
By default axel Set the maximum speed for downloading file in Bytes per Second. We can use this option when we have a slow network connection. Just add `-s` option followed by bytes value. Here we are going to download a file with `512KB/s`.
|
||||
默认上 axel 以字节/秒为单位设置下载文件的最大速度。当我们的网络连接速度较慢时,我们可以使用此选项。只需添加 `-s` 选项,后面跟字节值。这里我们要下载一个限速为 `512 KB/s` 的文件。
|
||||
|
||||
```
|
||||
# axel -s 512000 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -150,9 +148,9 @@ Connection 3 finished
|
||||
Downloaded 21.6 megabytes in 44 seconds. (494.54 KB/s)
|
||||
```
|
||||
|
||||
#### 4) Limit the Connections
|
||||
#### 4) 限制连接数
|
||||
|
||||
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 默认建立 4 个连接以从不同的镜像获取文件。此外,我们可以通过使用 `-n` 选项添加更多的连接,后跟连接数 `8` 来提高下载速度。我们为了更安全新添加了八个连接,但不幸的是,它花了更多时间来下载文件。
|
||||
|
||||
```
|
||||
# axel -n 10 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -192,9 +190,9 @@ Connection 3 finished
|
||||
Downloaded 21.6 megabytes in 5 seconds. (4109.41 KB/s)
|
||||
```
|
||||
|
||||
#### 5) Resume Incomplete download
|
||||
#### 5) 恢复未完成的下载
|
||||
|
||||
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 默认具有恢复未完成的下载的行为。Axel 在下载文件时定期更新状态文件(扩展名为 .st)。由于某些原因,下载中途停止了?不用担心,只要使用相同的 axel 命令,它将会检查 `file` 和 `file.st`,如果找到,它会从停止处恢复下载。
|
||||
|
||||
```
|
||||
# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -222,7 +220,7 @@ Starting download
|
||||
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.
|
||||
上面的输出清晰地显示了在下载断开时有两个文件 `owncloud-9.0.0.tar.bz2` 和 `owncloud-9.0.0.tar.bz2.st`。当重新开始下载时,它会从停止处开始下载。
|
||||
|
||||
```
|
||||
# ls -lh
|
||||
@ -259,17 +257,17 @@ Connection 0 finished
|
||||
Downloaded 3415.4 kilobytes in 1 second. (2264.93 KB/s)
|
||||
```
|
||||
|
||||
#### 6) Get the file without progress
|
||||
#### 6) 不显示文件下载进度
|
||||
|
||||
If you don’t want to see the file download progress, simply add `-q` option with axel command.
|
||||
如果你不想要看到文件的下载进度,只要在 axel 命令中加入 `-q` 选项。
|
||||
|
||||
```
|
||||
# axel -q https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
```
|
||||
|
||||
#### 7) Alternate progress indicator
|
||||
#### 7) 替换进度条
|
||||
|
||||
If you don’t like the default progress bar, you can use alternate progress indicator by adding -a option with axel command.
|
||||
如果你不喜欢默认的进度条,你可以使用 -a 选项来替换进度条。
|
||||
|
||||
```
|
||||
# axel -a https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
|
||||
@ -283,7 +281,7 @@ Starting download
|
||||
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
|
||||
@ -299,24 +297,24 @@ Connection 0 finished ]
|
||||
Downloaded 21.6 megabytes in 4 seconds. (5062.32 KB/s)
|
||||
```
|
||||
|
||||
#### 8) Read more about axel
|
||||
#### 8) 阅读更多关于 axel
|
||||
|
||||
If you want to know more option which is available for axel, simply navigate to man page.
|
||||
如果你想要了解更多关于 axel 的内容,只需要进入它的手册。
|
||||
|
||||
```
|
||||
# man axel
|
||||
or
|
||||
或者
|
||||
# axel --help
|
||||
```
|
||||
|
||||
Enjoy…)
|
||||
享受吧。。。)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.2daygeek.com/axel-command-line-downloader-accelerator-for-linux/
|
||||
|
||||
作者:[ MAGESH MARUTHAMUTHU][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
Loading…
Reference in New Issue
Block a user