View Full Version : Why does my ps not work
tdenson
01-20-2006, 06:08 AM
Whenever I run ps from a telnet session on my Tivo I get nothing, it just comes back to the bash prompt. I can't even induce an error message by giving it nonsense options. What's going on ?
Verne
01-20-2006, 06:51 AM
Are you just typeing "ps" on its own? Try "ps aux" instead.
Where is your ps installed, /var/hack/bin? Is that in your PATH? Try running it from that directory if it's not.
Are you sure you transferred it in binary mode?
If you've got ls installed do "ls -l /var/hack/bin/ps" and post back what it lists. Is it executable?
Can't think of anything else to try. Hope this helps.
tdenson
01-20-2006, 12:34 PM
Are you just typeing "ps" on its own? Try "ps aux" instead.
Where is your ps installed, /var/hack/bin? Is that in your PATH? Try running it from that directory if it's not.
Are you sure you transferred it in binary mode?
If you've got ls installed do "ls -l /var/hack/bin/ps" and post back what it lists. Is it executable?
Can't think of anything else to try. Hope this helps.
Thanks. It runs properly when I run it from /var/hack/bin - I must have a rogue copy in my path somewhere.
tdenson
01-20-2006, 12:51 PM
I now have a further oddity. There was a zero byte version in /var/hack which I have removed, however now when I just type ps I get -
bash: /var/hack/ps: No such file or directory
But if I type /var/hack/bin/ps it works.
healeydave
01-20-2006, 01:36 PM
you've answered your own question.
You had a duff ps at 0 bytes in /var/hack which you have now deleted hence the no such file or directory message.
The working version works from /var/hack/bin
Your .profile probably requires you to add the /var/hack/bin directory to your PATH statement so that you can run ps from elsewhere other than just the /var/hack/bin directory.
I suspect you have an exisitng path setup for /var/hack but not /var/hack/bin
tdenson
01-20-2006, 02:52 PM
you've answered your own question.
You had a duff ps at 0 bytes in /var/hack which you have now deleted hence the no such file or directory message.
The working version works from /var/hack/bin
Your .profile probably requires you to add the /var/hack/bin directory to your PATH statement so that you can run ps from elsewhere other than just the /var/hack/bin directory.
I suspect you have an exisitng path setup for /var/hack but not /var/hack/bin
No, I think you misunderstood what I said. The error you get if a program is not in the path is "command not found". I do have /var/hack/bin in my path, but if I run it without prefixing ps with /var/hack/bin I get "no such file or directory". This is *not* the error you get if it can't find ps.
tdenson
01-23-2006, 01:18 PM
Now rebooted and al is well, I think something was lurking.
aerialplug
01-24-2006, 05:43 AM
Bash caches the path.
(that sounds cool)
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.