Linux 将压缩数据的curl替换为wget
我们正在使用Linux 将压缩数据的curl替换为wget,linux,bash,dockerfile,wget,Linux,Bash,Dockerfile,Wget,我们正在使用curl,我们希望更改为wget curl命令如下所示: curl -fsSLO --compressed "https://yarnpkg.com/downloads/v1.22.4/yarn-v$1.22.4.tar.gz" && \ mkdir -p /opt && \ tar -xzf yarn-v1.22.4 -C /opt/ 我已尝试使用wget: wget -c "https://yarnpkg.co
curl
,我们希望更改为wget
curl
命令如下所示:
curl -fsSLO --compressed "https://yarnpkg.com/downloads/v1.22.4/yarn-v$1.22.4.tar.gz" && \ mkdir -p /opt && \
tar -xzf yarn-v1.22.4 -C /opt/
我已尝试使用wget
:
wget -c "https://yarnpkg.com/downloads/v1.22.4/yarn-v$1.22.4.tar.gz"
但不确定在
wget
wget
中是否有--compression=type
选项以获得相同的效果:
--compression=type
Choose the type of compression to be used. Legal values are auto, gzip and none.
对于
curl
和wget
压缩选项,将接受编码
头添加到请求中curl
添加接受编码:deflate、gzip、br
和wget
添加接受编码:gzip
HTTP请求已发送,等待响应。。。301永久移动