Skip to content
Advertisement

wget: Unsupported scheme on non-http URL

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.

Does it mean wget supports http and ftp ONLY?

Advertisement

Answer

man wget shows:

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

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
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement