小编Dav*_*e C的帖子

Bash 不再更改目录

我的 bash shell 将不再使用 cd 更改目录。我早些时候在工作时注意到它,发现我打开的任何新 shell(终端或 xterm 等)都会卡在主目录中并且无法退出(已经打开的终端继续正常工作)。

[~]$ pwd
/home/sys/dave
[~]$ cd /
[~]$ cd Documents/
[~]$ pwd
/home/sys/dave
[~]$ type cd
cd is a shell builtin
[~]$ alias
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
Run Code Online (Sandbox Code Playgroud)

我认为一定是我没有时间处理一些奇怪的事情,例如内存不足的处理程序(检查过 cd 没有别名并使用内置版本)。

所以我(是的,我知道)重新启动了机器。

全新启动,完全一样的问题。

另一方面,CSH 工作正常,所以在上面的代码片段之后立即:

[~]$ csh
[~]$ cd /
[/]$ pwd
/
[/]$ cd ~/Documents/
[~/Documents]$ pwd
/home/sys/dave/Documents
[~/Documents]$ 
Run Code Online (Sandbox Code Playgroud)

在过去的几天里,我没有安装任何新的东西或执行任何更新,直到今天晚上它都运行良好。

非常感谢想法/帮助/帮助!

** 更新 ** …

linux bash

14
推荐指数
1
解决办法
399
查看次数

标签 统计

bash ×1

linux ×1