wget命令下载文件

1、下载到当前目录

wget http://xxxx:xx/a.png

2、下载到指定目录

# wget -P 目标目录 资源连接
# 注意P是大写,目标目录不存在会自动创建
wget -P /root/xxx http://xxxx:xx/a.png

3、下载到指定目录并改名

# wget -O 目标文件名 资源连接
# 注意O是大写,如果目标目录不存在,下载失败,提示No such file or directory
wget -O /root/xxx/b.png http://xxxx:xx/a.png

猜你喜欢

转载自blog.csdn.net/weixin_39510828/article/details/119945276