-bash: /bin/ps: cannot execute binary file

我的Linux跑了几天,然后登陆上去出现这个:

login as: server
server@18.7.1.2's password:
Last login: Wed Sep 6 09:10:55 2006 from 21.21.12.16
-bash: /bin/hostname: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
[server@xx ~]$

然后ps显示:

[server@xx ~]$ ps
-bash: /bin/ps: cannot execute binary file

这个是什么原因?
[444 byte] By [crystal_heart-笑看风云] at [2008-4-24]
# 1
你是不是开机时加载某个脚本了,去掉试试
mayabin at 2007-10-20 > top of Msdn China Tech,Linux/Unix社区,系统维护与使用...
# 2
应该没有吧,系统刚启动的时候很正常的。只是连续跑了好几天才出问题。
# 3
bash加载的有问题?
mayabin at 2007-10-20 > top of Msdn China Tech,Linux/Unix社区,系统维护与使用...
# 4
bash加载的配置在哪里?
# 5
/etc/passwd里有用户shell指定,

你先替换一个shell,执行命令,看有没有问题,如果没有问题,说明bash坏了。
如果仍然有问题,检查一下用户权限,以及环境变量设置
mayabin at 2007-10-20 > top of Msdn China Tech,Linux/Unix社区,系统维护与使用...
# 6
如何替换一个shell?
# 7
修改/passwd文件,把里面的/bin/bash换成你机器里其他shell。
比如/bin/sh,或者/bin/csh
mayabin at 2007-10-20 > top of Msdn China Tech,Linux/Unix社区,系统维护与使用...
# 8
/bin/sh 跟bash一样效果
/bin/csh 出现cannot execute binary file
# 9
并且root帐号不能执行vi。
你的MSN多少?我的smile_in_wind@hotmail.com
# 10
检查一下,看看是否系统运行的进程数过多,线程数过多,内存耗尽,打开的文件句柄太多等。
多数是这种问题,而且一定是你们自己的一个进程将系统资源耗尽了。
Ropyn-剑心 at 2007-10-20 > top of Msdn China Tech,Linux/Unix社区,系统维护与使用...
# 11
没有跑自己的任何程序。