wget 与 curl 下载
wget 和 curl 是常用的命令行下载工具,各有特点。
wget 示例:
# 下载文件
wget https://example.com/file.zip
# 断点续传
wget -c https://example.com/bigfile.iso
# 递归下载网站
wget -r -l 2 https://example.comcurl 示例:
# 下载文件
curl -O https://example.com/file.zip
# 发送 GET 请求
curl https://api.example.com/users
# 发送 POST JSON
curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/users 