tags:

views:

26

answers:

3

Dear All,

i am working on ubuntu server from past few months and now suddenly ps, ifconfing commnad stop working with below error.

user1@Fb1:/usr/bin$ ps -bash: /bin/ps: No such file or directory

any suggestions to get this command working back.

A: 

What's the output of which ps and ls /usr/bin -al (which are both in /bin also)? Does it work if you gain root privileges, either using sudo ifconfig or sudo su, then ifconfig?

This is possibly an issue with file permissions but it's hard to say without more information.

Rob
as requested i loged in as rootroot@Fb1:~# ps-su: /bin/ps: No such file or directoryuser1@Fb1:/usr/sbin$ which ps/bin/psls /usr/bin -ali do not find ps file there pls help i will reply to all your answers
MITHIYA MOIZ
I meant for you to run `ls /usr/bin -al` separately so we can see if the files ("ps", "ifconfig") are there, and if they are, what their file permissions are. I have to guess at this point that either those files in /bin aren't there at all, or cannot be executed due to messed up permissions. I'm hoping for the latter, because that can probably be resolved without too much hassle. :)Naturally, if /bin is empty you're going to have a hard time running the commands that are in /bin, so share the output of each command so we'll get a better idea..
Rob
A: 

First use locate to find your ps or ifconfig program:

$ locate ps | grep bin

Also you may try whereis command:

$ whereis ps

If you don't find them, try to search as root user.

mosg
A: 

i have tried to put all the outputs of different commnads as below root@Fb1:/usr/bin# whereis ps ps: /bin/ps /usr/share/man/man1/ps.1.gz

root@Fb1:/usr/bin# ls -lsa ps 16 -rwxr-xr-x 1 root root 15859 2010-05-26 12:21 ps

MITHIYA MOIZ
What happened what you ran the commands?
Helen Neely