久经考验的 wget Linux网络命令:可以断点续传的网络下载工具wget详解_linux断点续传工具-CSDN博客
aria2 说明
- 虽然 aria2 的命令很多,很复杂。
- 但是,常用的那几个命令,其实也很简单。
aria2 & aria2c
- aria2c(c 可能表示 "client"? cli ? Linux CLI 是 "Command Line Interface" 的缩写,中文意思是命令行界面。),但为符合 Unix 命名惯例(去后缀),多数 Linux 发行版会创建 aria2 符号链接。这种行为与以下工具类似:
- gzip → gunzip(同一工具的不同模式)
- python → python3(版本别名)
- aria2 - The ultra fast download utility — aria2 1.37.0 documentation
- aria2 GitHub - aria2/aria2: aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
aria2 常用命令
# Download from WEB:
aria2c http://example.org/mylinux.iso
# Download from 2 sources:
$ aria2c http://a/f.iso ftp://b/f.iso
# Download using 2 connections per host:
$ aria2c -x2 http://a/f.iso
# aria2 常用命令
sudo apt install aria2
## Usage Examples
# Command-line scares you off? No, aria2 is really easy to use!!
# Download from WEB:
aria2c http://example.org/mylinux.iso
# Download from 2 sources:
$ aria2c http://a/f.iso ftp://b/f.iso
# Download using 2 connections per host:
$ aria2c -x2 http://a/f.iso
# BitTorrent:
aria2c http://example.org/mylinux.torrent
# BitTorrent Magnet URI:
aria2c 'magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C'
# Metalink:
aria2c http://example.org/mylinux.metalink
# Download URIs found in text file:
aria2c -i uris.txt
$ aria2c -h
-c, --continue[=true|false] Continue downloading a partially downloaded
file. Use this option to resume a download
started by a web browser or another program
which downloads files sequentially from the
beginning. Currently this option is only
applicable to http(s)/ftp downloads.Possible Values: true, false
Default: false
Tags: #basic, #http, #ftp
aria2c -c 完整命令的例子
aria2的-c选项用于断点续传,即在下载被中断时,可以从上次停止的地方继续下载。以下是一些使用aria2和-c选项的完整命令例子:
1. 单个文件断点续传:
aria2c -c http://example.com/file.zip
这个命令会从http://example.com/file.zip
下载文件,并在下载被中断后,使用-c选项从上次停止的地方继续下载。
2. 指定文件名和断点续传:
aria2c -c -o myfile.zip http://example.com/file.zip
这个命令除了断点续传外,还使用-o选项将下载的文件重命名为myfile.zip
。
3. 多线程下载和断点续传:
aria2c -c -x 4 http://example.com/largefile.zip
这个命令使用-x选项指定4个线程来加速下载,并在下载中断后,使用-c选项从上次停止的地方继续下载。
4. 限制下载速度和断点续传
aria2c -c --max-download-limit=500K http://example.com/file.zip
这个命令在断点续传的同时,使用--max-download-limit选项将下载速度限制为500KB/s。
5. 从FTP服务器断点续传:
aria2c -c ftp://example.com/file.zip
这个命令会从FTP服务器上的ftp://example.com/file.zip
下载文件,并在下载被中断后,使用-c选项从上次停止的地方继续下载。
请注意,这些例子中的URL(如http://example.com/file.zip
)应替换为实际的文件下载链接。此外,aria2还支持许多其他选项和功能,可以根据需要进行组合使用。
以上信息基于aria2的官方文档和常见用法,具体命令和选项可能会因aria2的版本不同而有所差异。建议查阅aria2的官方文档或使用aria2c --help
命令获取最准确的信息。
## axel
sudo apt update
sudo apt install axel
# 使用8个连接
axel -n 8 http://example.com/file.zip
# 将下载速度限制为 500 KB/s
axel -s 500k http://example.com/file.zip
# 断点续传
axel -c http://example.com/file.zip
axel GitHub - axel-download-accelerator/axel: Lightweight CLI download accelerator
** linux的wget下载大文件技巧 - 问答 - 亿速云
Linux下常用下载工具比较:wget、curl、axel与aria2 - 极简博客
结论
wget、curl、axel和aria2都是常用的Linux下载工具,它们各自有着不同的特点和适用场景。
- 如果只是简单的文件下载,可以使用wget或curl。
- 如果需要加速下载速度,可以尝试使用axel。
- 而aria2则是功能最为丰富的下载工具,可以满足更多高级需求。
根据自己的需求选择合适的下载工具,可以提高下载效率和体验。
*** wget、axel、aria2区别与用法 - lisenMiller - 博客园
首先区别是:
wget、axel和aria2都是在命令行下使用的下载工具,但它们在功能和特性上有一些区别。
wget是最基础的命令行下载工具,它支持HTTP、HTTPS和FTP协议,并且可以在慢速或不稳定的网络连接下保持健壮性。如果下载过程中发生网络问题,wget会尝试重新下载,直到整个文件下载完成。此外,wget对于简单的下载任务来说非常实用,只需要输入简单的命令就可以完成。
axel是一个轻量级的下载加速器,它支持HTTP、HTTPS、FTP和FTPS协议。Axel通过为文件打开多个连接并下载单独的文件片段来加速下载过程,这可以使下载速度提高多达40%。此外,它也可以使用多个镜像站点来下载单个文件。
aria2是一个功能强大且速度更快的下载工具,它支持多种协议和下载方式,包括HTTP/HTTPS、FTP/SFTP、BitTorrent和Metalink。aria2的一个突出特性是支持从多个位置同时下载文件,这对于提高下载速度非常有帮助。此外,aria2还包含了一个功能齐全的BitTorrent客户端,支持DHT、PEX、加密、磁铁URI、网络种子、选择性下载和本地对等发现等特性。然而,aria2的使用需要较复杂的命令语法,对于不熟悉命令行操作的用户来说可能有一定的学习难度。
综上所述,wget、axel和aria2在功能和特性上各有优势。
- 对于简单的下载任务,wget可能更加简单和实用;
- 对于需要加速的下载任务,axel可能是一个不错的选择;
- 而对于需要更多高级功能和协议支持的下载任务,aria2可能是更好的选择。
Linux下什么下载工具比较好?aria2 与 axel 比较
axel 啊。 aria2 不好调参数,有2个参数互相影响,要达到最大速度很麻烦。axel 直接 -n 8/100 都可以,不要想多余的。 https://www.zhihu.com/question/20082724/answer/13916204
aria2
The next generation download utility.
aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.
Download
Download version 1.37.0. There you can download source distribution and binaries for OS X, Windows and Android.
The legacy releases earlier than 1.19.1 are available here.
Features
-
Multi-Connection Download. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. Really speeds up your download experience.
-
Lightweight. aria2 doesn’t require much memory and CPU time. When disk cache is off, the physical memory usage is typically 4MiB (normal HTTP/FTP downloads) to 9MiB (BitTorrent downloads). CPU usage in BitTorrent with download speed of 2.8MiB/sec is around 6%.
-
Fully Featured BitTorrent Client. All features you want in BitTorrent client are available: DHT, PEX, Encryption, Magnet URI, Web-Seeding, Selective Downloads, Local Peer Discovery and UDP tracker.
-
Metalink Enabled. aria2 supports The Metalink Download Description Format (aka Metalink v4), Metalink version 3 and Metalink/HTTP. Metalink offers the file verification, HTTP/FTP/SFTP/BitTorrent integration and the various configurations for language, location, OS, etc.
-
Remote Control. aria2 supports RPC interface to control the aria2 process. The supported interfaces are JSON-RPC (over HTTP and WebSocket) and XML-RPC.
Usage Examples
Command-line scares you off? No, aria2 is really easy to use!!
Download from WEB:
$ aria2c http://example.org/mylinux.iso
Download from 2 sources:
$ aria2c http://a/f.iso ftp://b/f.iso
Download using 2 connections per host:
$ aria2c -x2 http://a/f.iso
BitTorrent:
$ aria2c http://example.org/mylinux.torrent
BitTorrent Magnet URI:
$ aria2c 'magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C'
Metalink:
$ aria2c http://example.org/mylinux.metalink
Download URIs found in text file:
$ aria2c -i uris.txt
Related Projects
- apt-metalink: Faster package downloads for Debian/Ubuntu
- powerpill: Pacman wrapper for parallel and segmented downloads.
- python3-aria2jsonrpc: A wrapper class around Aria2’s JSON RPC interface.
- aria2.js: JavaScript (browsers and Node.js) library and cli for aria2 RPC
UI Frontends
- webui-aria2: Web browser interface for aria2 (2012 GSOC project)
- uGet: the Linux Download Manager
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Linux axel 下载加速命令详解
简介
axel 命令是一个轻量级、快速且用户友好的 Linux 命令行下载加速器。它通过将文件分割成片段并同时下载来加快下载速度,这对于大文件和网络不好时尤其有用。
axel 支持 HTTP、HTTPS、FTP 和 FTPS 协议。
安装
Debian/Ubuntu
sudo apt update
sudo apt install axel
CentOS/RHEL
sudo yum install axel
Fedora
sudo dnf install axel
MacOS
brew install axel
关键特性
- 并行连接:将文件分成几部分并同时下载
- 断点续传:恢复中断的下载
- 简单而最小的输出:为提高效率而设计
常用选项
--max-speed, -s:指定最大下载速度
--num-connections, -n:指定连接数
--output, -o:指定输出的文件名称
--no-proxy, -N:不使用代理服务器
--verbose, -v:显示更多状态信息
--quiet, -q:安静模式,最小化输出
--alternate, -a:显示一个可选的进度条
--header, -H:添加额外的 HTTP 标头
--help, -h:打印帮助信息
--version, -V:打印版本信息
示例用法
使用多个连接下载(默认值:4)
axel -n 8 http://example.com/file.zip
# 使用8个连接
指定输出的文件名
axel -o custom_name.zip http://example.com/file.zip
断点续传
axel -c http://example.com/file.zip
限制下载速度
axel -s 500k http://example.com/file.zip
# 将下载速度限制为 500 KB/s
设置重试次数
axel -r 3 http://example.com/file.zip
安静模式
axel -q http://example.com/file.zip
# 最小化输出信息
调试模式
axel -v http://example.com/file.zip
# 输出更多调试信息
使用代理服务器
axel -x http://proxy_server:port http://example.com/file.zip
设置用户代理
axel -U "Mozilla/5.0" http://example.com/file.zip
指定可选的镜像
axel -a http://mirror1.com/file.zip http://mirror2.com/file.zip
配置文件示例
配置文件在 /etc/axelrc 或 ~/.axelrc
# 重连延迟
reconnect_delay = 20# 最大下载速度
max_speed = 500000# 同时下载的连接数
num_connections = 4# 连接超时时间
connection_timeout = 30# 一次从所有当前连接读取的最大数量
buffer_size = 10240# 输出更多信息
verbose = 1# 默认下载目录
default_directory = /downloads# 代理服务器
http_proxy=127.0.0.1
# 重连延迟
reconnect_delay = 20
# 最大下载速度
max_speed = 500000
# 同时下载的连接数
num_connections = 4
# 连接超时时间
connection_timeout = 30
# 一次从所有当前连接读取的最大数量
buffer_size = 10240
# 输出更多信息
verbose = 1
# 默认下载目录
default_directory = /downloads
# 代理服务器
http_proxy=127.0.0.1
原文链接:https://blog.csdn.net/tangPHP/article/details/144777717
在 Linux 上使用多线程下载文件,你可以使用工具如 aria2 或 wget 来实现。
1. 使用 aria2 进行多线程下载
aria2 是一个轻量级的多线程下载工具,支持 HTTP、FTP 和其他协议,适合用来进行多线程下载。
安装 aria2:
在终端中执行以下命令安装 aria2:
sudo apt-get install aria2
使用 aria2 进行多线程下载:
使用 aria2c 命令下载文件,并指定线程数量。你可以通过 -x 选项来指定并发连接数(线程数)。
aria2c -x 16 https://developer.nvidia.com/compute/cudnn/secure/8.6.0/local_installers/11.8/cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
上面的命令将使用 16 个并发连接下载文件。你可以根据网络状况调整线程数。
2. 使用 wget(不支持多线程)
虽然 wget 是非常常用的下载工具,但它并不支持多线程下载。你可以使用 wget 进行下载,但下载速度可能比 aria2 稍慢:
wget https://developer.nvidia.com/compute/cudnn/secure/8.6.0/local_installers/11.8/cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
3. 使用 curl 进行分段下载并合并(模拟多线程)
虽然 curl 也不支持多线程,但可以通过分段下载的方式来模拟多线程操作。以下是一个简单示例:
# 使用 curl 分段下载文件的不同部分
curl -o part1 -r 0-50000000 https://developer.nvidia.com/compute/cudnn/secure/8.6.0/local_installers/11.8/cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
curl -o part2 -r 50000001-100000000 https://developer.nvidia.com/compute/cudnn/secure/8.6.0/local_installers/11.8/cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz# 合并文件
cat part1 part2 > cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
但这种方法需要你手动计算分段大小,并且不是非常方便。
总结:
最推荐使用的是 aria2,它是一个轻量且支持多线程下载的工具,能够极大加快下载速度。
原文链接:https://blog.csdn.net/peng0614/article/details/142979620
linux wget 可以多线程 下载吗?
wget在Linux系统中不支持多线程下载。wget是一个非常强大的命令行下载工具,但它主要是单线程下载工具,不支持多线程下载1。尽管wget支持断点续传、限制下载速度等功能,但它本身并不支持同时从多个源下载或同时下载文件的多个部分。
如果你需要使用多线程下载,可以考虑使用其他工具,如:
- axel:这是一个轻量级的命令行下载工具,支持多线程下载,能够显著提高下载速度。
- aria2:这是一个功能强大的命令行下载工具,支持多线程下载、断点续传、BitTorrent协议等。
- curl:虽然curl本身不支持多线程下载,但可以通过一些技巧实现类似效果,例如通过指定多个起始位置和结束位置来模拟多线程下载。
linux 下载工具:axel 与 aria2 比较,哪一个更好?
Aria2和Axel各有优缺点,选择哪一个更好取决于具体需求和使用场景。
Aria2
Aria2是一个轻量级的下载管理器,支持多种协议和多源下载。它可以通过命令行界面操作,支持HTTP/HTTPS、FTP、SFTP、BitTorrent和Metalink等多种协议。Aria2的主要特点包括:
- 多线程下载:Aria2支持多线程下载,可以使用多个源或协议下载文件,从而加速下载过程。
- 轻量级:Aria2不需要太多的内存和CPU资源,适合长时间运行的任务。
- 功能丰富:支持分段下载、选择性下载、限制下载/上传速度等功能。
Axel
Axel是一个轻量级的下载程序,支持HTTP、HTTPS、FTP和FTPS协议。它通过多线程下载来显著提升下载速度。Axel的主要特点包括:
- 简单易用:操作简单,用户只需在命令行中指定URL和输出目录即可开始下载。
- 默认多线程:Axel默认使用16个线程进行下载,用户可以自行调整线程数量以适应不同的网络环境。
- 资源占用少:由于没有依赖,使用非常少的CPU和内存。
适用场景
- Aria2:适合需要高效下载大量文件或大文件的场景,特别是那些需要支持多种协议和高级功能的用户。Aria2的多线程和分段下载功能使其在网络条件不稳定时也能保持较高的下载速度和效率。
- Axel:适合需要快速下载单个或少量文件的用户,特别是那些对资源占用有严格要求的场景。Axel的简单易用和多线程特性使其在需要快速完成下载任务时表现出色。
Linux命令行多线程、断点续传下载工具
2017-11 Linux命令行多线程、断点续传下载工具-阿里云开发者社区
简介:
mytget版本,注意myget命令为mytget
# mytget -v
myget 0.1.1
aria2 与 aria2c 的区别
aria2
和 aria2c
本质上是同一个工具的不同名称,没有功能区别。以下是详细说明:
核心结论
-
aria2c
是aria2
的可执行文件(二进制程序)的默认名称。 -
aria2
通常作为命令别名或符号链接指向aria2c
。 -
两者完全等同,具体使用哪个取决于系统环境和安装方式。
区别详解
对比项 | aria2 | aria2c |
---|---|---|
本质 | 通常为符号链接或别名 | 实际二进制文件名 |
调用方式 | 依赖系统环境配置 | 直接执行二进制文件 |
典型场景 | 多数Linux发行版的默认命令名 | macOS/Windows 安装包常用名称 |
验证方法 | which aria2 → 查看指向路径 | which aria2c → 查看真实二进制路径 |
验证示例
bash
Copy
# 在 Linux 系统中检查(通常两者指向同一文件) $ ls -l /usr/bin/aria2 lrwxrwxrwx 1 root root 5 Mar 10 2023 /usr/bin/aria2 -> aria2c # 查看帮助文档(完全一致) $ aria2 --help $ aria2c --help # 检查版本信息(输出相同) $ aria2 -v aria2 version 1.36.0 $ aria2c -v aria2 version 1.36.0
使用建议
-
优先使用
aria2
多数文档和社区教程默认使用此名称:bash
Copy
aria2 -x 16 http://example.com/file.iso
-
特殊情况下使用
aria2c
当系统未配置符号链接时(如某些Windows环境):cmd
Copy
aria2c.exe -s 8 ftp://example.com/file.zip
-
兼容性处理
若遇到脚本兼容性问题,可手动创建符号链接:bash
Copy
sudo ln -s /usr/bin/aria2c /usr/local/bin/aria2
常见误区
-
❌ "
aria2
是新一代工具,aria2c
是旧版"
→ 二者始终同步更新,版本完全一致。 -
❌ "
aria2
支持更多协议"
→ 协议支持由编译选项决定,与命令名称无关。 -
❌ "Windows 必须用
aria2c.exe
"
→ 可重命名文件为aria2.exe
,功能不变。
底层原理
编译后的二进制文件默认命名为 aria2c
(c
可能表示 "client"),但为符合 Unix 命名惯例(去后缀),多数 Linux 发行版会创建 aria2
符号链接。这种行为与以下工具类似:
-
gzip
→gunzip
(同一工具的不同模式) -
python
→python3
(版本别名)
若仍有疑问,可通过检查文件哈希值确认二者是否相同:
md5sum /usr/bin/aria2 /usr/bin/aria2c
# 输出相同哈希值即证明为同一文件