wget:非HTTP URL上不受支持的方案 [英] wget: Unsupported scheme on non-http URL

查看:1064
本文介绍了wget:非HTTP URL上不受支持的方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的shell脚本中有以下一行:

I have the following line in my shell script:

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.

这是否意味着wget仅支持http和ftp?

Does it mean wget supports http and ftp ONLY?

推荐答案

man wget显示:

它支持HTTP,HTTPS和FTP协议以及检索 通过HTTP代理.

It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

尝试curl,它支持文件URL.另请注意,您可能需要在此处使用三个斜杠.两个属于协议指示符(file://),一个属于路径(/myhost/system.log)

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)

export URL=file:///myhost/system.log

这篇关于wget:非HTTP URL上不受支持的方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆