Mac系统下No such file or directory的问题解决
我在Mac下安装了个软件,需要手工对文件进行配置下,于是打开terminial终端直接进行操作。
有一个很怪异的地方,就是我进行操作的时候,明明当前目录下有那个目录文件,但我使用命令的时候,却死活进不去,而且系统显示:
No such file or directory
这真是奇了怪了。刚开始时,我以为是自己输入的目录名称有误,还专门核对了下,再次输入操作,问题依旧,显示无该目录。
于是我改复制该目录名称,然后再粘贴进行操作,发现仍然无济于事?
难道是操作权限的问题?我心中疑惑到,但想了下觉得不对呀,
我这个当前操作身份本身就是系统管理员的身份啊。
百思不得其解,只好上网百度下,发现在Mac系统下,空格要转义符,比如一个目录名称为:
my directory
操作的时候应该为:
cd my \ directory
在空格前边加多个""转义符即可。
又或者另外一种方法,即将目录名称用""起来,如上述目录操作为:
cd"my directory"
这样就可以了。
返回Mac重新操作,果然问题解决。
Congratulations @rivalhw! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOPTo support your work, I also upvoted your post!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Windows下也应该需要转义或者双引号包围
只不过我们很少在字符界面下操作(^_^)