Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 将压缩数据的curl替换为wget_Linux_Bash_Dockerfile_Wget - Fatal编程技术网

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永久移动