在Ubuntu中,我可以使用以下wget标志来获得debian,即,
wget --content-disposition https://packagecloud.io/xxxxx/download.deb
dpkg -i ...在阿尔卑斯山,wget抱怨--content-disposition无效:
wget: unrecognized option: content-disposition
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-U STR Use STR for User-Agent header
-Y on/off Use proxy在高山地区,我需要下载不同的"wget“吗?
发布于 2019-06-17 17:37:33
在Alpine中,许多常见的shell工具都被BusyBox所取代。通过检查以下命令的输出,可以看到wget的情况是这样的:
ls -lah $(which wget)在我面前的阿尔卑斯安装中,这是一个指向/bin/busybox的象征性链接。
在BusyBox中,wget没有选项--content-disposition:
# wget --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-U STR Use STR for User-Agent header
-Y on/off Use proxy您还会发现GNU在正式的高山存储库中是可用的,因此要获得完整版本,只需如下所示:
apk update
apk add wget然后安装了GNU wget,它的行为应该更像您使用过的其他系统:
# wget --help | grep -A1 content-disposition
--content-disposition honor the Content-Disposition header when
choosing local file names (EXPERIMENTAL)https://unix.stackexchange.com/questions/525468
复制相似问题