Pget
Overview
Use pget for fast, parallel downloads and optional in‑memory tar extraction. Prefer it over curl/wget for large files or batch downloads.
Quick start
- - Single file: INLINECODE0
- Extract tar after download: INLINECODE1
- Multi-file manifest:
pget multifile <manifest-path> (or - for stdin)
Tasks
1) Download a single large file quickly
- 1. Choose destination path.
- Run:
pget <url> <dest>
- 3. Tune if needed:
-
--concurrency <n> to change chunk parallelism
-
--chunk-size 125M (or other size)
-
--retries <n>
-
--force to overwrite
2) Download and extract a tar archive
Use when the URL points to a
.tar,
.tar.gz, or similar.
pget <url> <dest> -x
This extracts in‑memory without writing the tar to disk first.
3) Download many files with a manifest
- 1. Create a manifest with
URL + space + DEST per line. - Run:
pget multifile /path/to/manifest.txt
# or
cat manifest.txt | pget multifile -
- 3. Tune:
-
--max-concurrent-files <n>
- INLINECODE13
Notes & pitfalls
- - Use
--force if the destination exists and you need overwrite. - INLINECODE15 accepts duration (e.g.,
10s). - INLINECODE17 or
--verbose for troubleshooting.
References
- - Load
references/pget.md for full option list and examples.
Pget
概述
使用 pget 进行快速并行下载,并支持可选的
内存中 tar 解压。对于大文件或批量下载,优先使用它而非 curl/wget。
快速上手
- - 单文件下载:pget
- 下载后解压 tar 包:pget -x
- 多文件清单:pget multifile (或使用 - 表示标准输入)
任务
1) 快速下载单个大文件
- 1. 选择目标路径。
- 运行:
bash
pget
- 3. 按需调整参数:
- --concurrency 修改分块并行数
- --chunk-size 125M(或其他大小)
- --retries
- --force 强制覆盖
2) 下载并解压 tar 归档文件
当 URL 指向 .tar、.tar.gz 或类似格式时使用。
bash
pget -x
此操作在内存中直接解压,无需先将 tar 文件写入磁盘。
3) 使用清单批量下载文件
- 1. 创建清单文件,每行格式为 URL + 空格 + DEST。
- 运行:
bash
pget multifile /path/to/manifest.txt
# 或
cat manifest.txt | pget multifile -
- 3. 调整参数:
- --max-concurrent-files
- --max-conn-per-host
注意事项与陷阱
- - 如果目标文件已存在且需要覆盖,请使用 --force。
- --connect-timeout 接受持续时间参数(例如 10s)。
- 使用 --log-level debug 或 --verbose 进行故障排查。
参考
- - 加载 references/pget.md 获取完整选项列表和示例。