ANALYSIS
Linux 每日一篇 - 24 - wget
Linux 文件下载神器!掌握 wget 命令,轻松下载网络文件,让文件获取更高效!
wget 命令是什么?
wget(Web Get)是 Linux 中一个强大的命令行下载工具,可以从网络上下载文件并支持断点续传、递归下载等功能。
基本用法
PRTCL // PLAINTEXT
# 下载单个文件wget http://example.com/file.txt
# 下载文件并指定保存名称wget -O newname.txt http://example.com/file.txt
# 下载文件并保持原始名称wget -O - http://example.com/file.txt
# 限制下载速度wget --limit-rate=200k http://example.com/file.zip
# 设置重试次数wget --tries=5 http://example.com/file.txt
# 设置超时时间wget --timeout=30 http://example.com/file.txt
# 后台下载wget -b http://example.com/file.zip实用技巧
PRTCL // PLAINTEXT
# 断点续传wget -c http://example.com/largefile.zip
# 递归下载整个网站wget --mirror --convert-links --page-requisites --no-parent http://example.com
# 下载指定类型的文件wget -r -A "*.pdf" http://example.com/docs
# 从文件列表下载wget -i urls.txt
# 设置下载延迟(避免对服务器造成压力)wget --wait=1 --random-wait http://example.com/file.txt
# 使用用户名和密码下载wget --user=username --password=password http://example.com/protected/file.txt
# 忽略证书错误(HTTPS)wget --no-check-certificate https://example.com/file.txt
# 仅检查文件是否存在wget --spider http://example.com/file.txt
# 下载到指定目录wget -P /path/to/directory http://example.com/file.txt
# 后台下载并记录日志wget -b -o wget.log http://example.com/file.zip常用场景
PRTCL // PLAINTEXT
# 下载软件包wget https://example.com/software.tar.gz
# 备份网站wget --mirror --convert-links --page-requisites --no-parent -P backup/ http://example.com
# 下载大文件(支持断点续传)wget -c https://example.com/largefile.iso
# 批量下载文件echo -e "http://example.com/file1.txt\nhttp://example.com/file2.txt" > urls.txtwget -i urls.txt
# 镜像整个目录wget -r -np -nH --cut-dirs=1 -R "index.html*" http://example.com/downloads/
# 限制带宽使用wget --limit-rate=100k http://example.com/file.zip
# 后台下载大文件wget -b -o download.log -c http://example.com/largefile.zip抖音文案
🎯 Linuxwget 命令!
✅ 基本用法:wget ✅ 常用参数:wget -option ✅ 实用技巧:wget —help
每天一个 Linux 命令,30 天变身 Linux 高手!
#Linux 入门 #Shell 命令 #程序员必备 #技术分享
关于我
全平台同名”汪多多是只猫”,专注分享实用技术教程,让你的 IT 学习之路更轻松!
关注我,每天一个 Linux 命令,轻松入门 Linux 系统!
R P
Rhine Lab Pioneer Division
Auth_Verified: 2026.04.08
Auth_Verified: 2026.04.08
