Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 无法在OS X中创建bashrc_Macos_Bash - Fatal编程技术网

Macos 无法在OS X中创建bashrc

Macos 无法在OS X中创建bashrc,macos,bash,Macos,Bash,我无法在主目录中创建.bashrc文件。当我尝试使用touch时,我得到: touch: .bashrc: No such file or directory 当我在主目录中键入vim.bashrc并尝试使用:w保存时,它会显示 E166: Can't open linked file for writing 编辑: ls-l.bash*的输出 lrwxr-xr-x 1 ankitsultana staff 34 Oct 30 2014 .bash -> /Users/a

我无法在主目录中创建
.bashrc
文件。当我尝试使用
touch
时,我得到:

touch: .bashrc: No such file or directory
当我在主目录中键入
vim.bashrc
并尝试使用
:w
保存时,它会显示

E166: Can't open linked file for writing

编辑:

ls-l.bash*的输出

lrwxr-xr-x  1 ankitsultana  staff    34 Oct 30  2014 .bash -> /Users/ankitsultana/.dotfiles/bash
-rw-------  1 ankitsultana  staff  7069 Nov 26 01:04 .bash_history
-rw-r--r--  1 ankitsultana  staff  2633 Nov 26 13:51 .bash_profile
-rw-r--r--  1 ankitsultana  staff   167 Sep 21  2014 .bash_profile-anaconda.bak
-rw-r--r--  1 ankitsultana  staff  1791 Jun 30  2015 .bash_profile.pysave
lrwxr-xr-x  1 ankitsultana  staff    36 Oct 30  2014 .bashrc -> /Users/ankitsultana/.dotfiles/bashrc

听起来.bashrc是一个符号链接,指向一个您不拥有/无权修改的文件。
ls-la ~
显示什么?您可以执行
ls-l.bash*
并查看结果吗?我执行了
ls-l.bash*
,返回了
/Users/myname/.dotfiles/bashrc
。我不知道为什么会有这种情况。它还显示了
/Users/myname/.dotfiles/bash
。还有这些
.bash history.bash_profile.bash_profile-anaconda.bak.bash_profile.pysave
你能把整个输出都考虑进去吗?它将更容易阅读。因此它是一个悬挂的符号链接
rm.bashrc
并正常进行。听起来像.bashrc是一个符号链接,指向您不拥有/无权修改的文件。
ls-la ~
显示什么?您可以执行
ls-l.bash*
并查看结果吗?我执行了
ls-l.bash*
,返回了
/Users/myname/.dotfiles/bashrc
。我不知道为什么会有这种情况。它还显示了
/Users/myname/.dotfiles/bash
。还有这些
.bash history.bash_profile.bash_profile-anaconda.bak.bash_profile.pysave
你能把整个输出都考虑进去吗?它将更容易阅读。因此它是一个悬挂的符号链接<代码>rm.bashrc
并正常进行。