跳转至

极速解压和下载

极速解压

tar -I pigz -xf file.tar.gz

极速解压带进度条

pv file.tar.gz  | tar -I pigz -xvf -

跨目录解压

​ /a/yinzhipeng/MiniMax-M2.5-W8A8-INT8-Dynamic.tar解压到/b/yinzhipeng/下

pv /a/yinzhipeng/MiniMax-M2.5-W8A8-INT8-Dynamic.tar | tar -xf - -C /b/yinzhipeng/

极速下载命令

nohup aria2c \
-x 16 -s 16 -k 4M \
--file-allocation=none \
--continue=true \
--max-connection-per-server=16 \
--min-split-size=4M \
--summary-interval=5 \
--max-tries=0 \
--timeout=30 \
"URL" > aria2_$(date +%Y%m%d_%H%M%S).log 2>&1 &
nohup aria2c \                                # 后台运行,终端关闭也不影响
-x 32 -s 32 -k 4M \                           # 32连接 + 分32块下载,每块4MB
--file-allocation=none \                      # 不预分配磁盘(避免慢)
--continue=true \                             # 支持断点续传
--max-connection-per-server=32 \              # 单服务器最大32连接
--min-split-size=4M \                         # 分片最小4MB,避免过碎
--summary-interval=5 \                        # 每5秒输出一次下载进度
--max-tries=0 \                               # 无限重试(很关键)
--timeout=30 \                                # 30秒无响应就重连
"URL" > aria2_$(date +%Y%m%d_%H%M%S).log 2>&1 &  # 日志带时间戳,避免覆盖
下载结果:
[#2657df 17GiB/57GiB(30%) CN:16 DL:733MiB ETA:56s]
这个表示:735 MiB/s(每秒735MB左右)

批量查看日志进度

for f in aria2_*.log; do     last_progress=$(grep -P 'OK|\d+%.*DL:\d+MiB' "$f"  | tail -3);   echo "=======";  echo "$f  : $last_progress"; done | grep -P 'OK|\d+%.*DL:\d+MiB|=' --color
for f in aria2_*.log; do     echo "=== $f ===";     tail -n 10 "$f"; done