Linux wget:非 http URL 上不支持的方案
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13387970/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
wget: Unsupported scheme on non-http URL
提问by John Powel
I have the following line in my shell script:
我的 shell 脚本中有以下行:
export URL=file://myhost/system.log
wget -v $URL
When I tried to run the script it give me the following error:
当我尝试运行脚本时,它给了我以下错误:
file://myhost/system.log: Unsupported scheme.
Does it mean wget supports http and ftp ONLY?
这是否意味着 wget 仅支持 http 和 ftp?
采纳答案by Alex Howansky
man wget
shows:
man wget
显示:
It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
它支持 HTTP、HTTPS 和 FTP 协议,以及通过 HTTP 代理检索。
Try curl, it supports file URLs. Also note you probably want three slashes here. Two belong to the protocol indicator (file://) and one belongs to the path (/myhost/system.log)
试试 curl,它支持文件 URL。另请注意,您可能需要在这里使用三个斜杠。两个属于协议指示符(file://),一个属于路径(/myhost/system.log)
export URL=file:///myhost/system.log
回答by Gilles Quenot
There's 2 mistakes :
有2个错误:
wget
doesn't support file:// scheme- with
Linux
, the variables are called like"$URL"
, not%URL%
like windows
wget
不支持 file:// 方案- 同
Linux
时,变量被称为喜欢"$URL"
,不%URL%
喜欢窗户
回答by Massimo
wget for windows doesn't support https
wget for windows 不支持 https
unsupported scheme
不受支持的方案
tested : GNU Wget 1.9.1, a non-interactive network retriever
测试:GNU Wget 1.9.1,一个非交互式网络检索器