如何使用文件协议访问本地系统上的目录? [英] How to use file protocol to access a directory on local system?

查看:82
本文介绍了如何使用文件协议访问本地系统上的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜欢/usr/local?

我尝试了file:///usr/local但失败了

[root@www2 robot]# cd file:///usr/local
-bash: cd: file:///usr/local: No such file or directory

推荐答案

如果需要从外壳访问通用URL,请尝试使用curl代替猫:

If you have a requirement to be able to access generic URLs from your shell, try using curl as a replacement for your cat:

curl file:///path/to/file.txt
curl http://www.domain.com/file.txt

但是正如其他张贴者所指出的那样,shell本身无法理解URL.

But as other posters have pointed out, the shell itself doesn't understand URLs.

这篇关于如何使用文件协议访问本地系统上的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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