<分区>
Possible Duplicate:
wget: Unsupported scheme on non-http URL
例如:
export URI=file:///myhost/system.log
如何在 bash 中从这个 URI 下载 system.log 文件?
我试过使用 wget
和 curl
但它们不支持 FILE URI 方案。
<分区>
Possible Duplicate:
wget: Unsupported scheme on non-http URL
例如:
export URI=file:///myhost/system.log
如何在 bash 中从这个 URI 下载 system.log 文件?
我试过使用 wget
和 curl
但它们不支持 FILE URI 方案。
最佳答案
尝试这样做:
export URI="file:///etc/passwd"
curl -s "$URI" > /tmp/l
cat /tmp/l
如果你需要下载一个远程文件,你应该使用另一种协议(protocol)(和方案),比如:
curl ftp://user:password@host:port/path/to/file
或
scp host:/path/to/file file
等...
注意
curl
能够下载文件方案,不管你说什么。
关于linux - 如何在 bash 中通过 FILE URI 方案下载文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13402955/