1834247 Members
2660 Online
110066 Solutions
New Discussion

commands help

 
SOLVED
Go to solution
prasadb
Super Advisor

commands help

hello experts,
i one of my servers i am facing somewhat strange problem, when i run any command,say in this case..

# sam ...i got this message
sh: sam: not found.

then i used whereis sam..

and then i wrote..

/usr/sbin/sam..and it worked fine..i want that just by typing sam i should be able to get it..

please tell me how to achieve it
2 REPLIES 2
Jeff_Traigle
Honored Contributor
Solution

Re: commands help

You obviously do not have /usr/sbin in your PATH. One of the first lines in root's .profile by default is:

PATH=/usr/sbin:$PATH:/sbin:/home/root

I'd say you're not using the default .profile or someone removed or commented this line frm teh default... or set the PATH to something else that does not include /usr/sbin further in the file.
--
Jeff Traigle
prasadb
Super Advisor

Re: commands help

thanx jeff. i created the file specified..