【发布时间】:2013-09-05 00:13:48
【问题描述】:
我更改~/.bash_profile文件时不小心出错了,现在我无法运行任何命令,例如ls、touch、sudo等。
当我写echo $PATH 时,我得到了这样的结果:
$ echo $PATH
/usr/local/bin:
$
当我输入/bin/cat ~/.bash_profile 时,我得到了这个结果:
export PATH=$HOME/local/node/bin:/usr/local/bin:$PATH
export PATH=/usr/local/bin:$PATHh
但我无法更改它。有人可以帮帮我吗?
【问题讨论】:
-
你怎么改不了?你可以在终端中使用“
vi”或“emacs”吗? -
你也可以运行
/usr/bin/open -e ~/.bash_profile在TextEdit中编辑~/.bash_profile。