Operating System - HP-UX
1751973 Members
5482 Online
108784 Solutions
New Discussion

Commands are not executing properly in one of our server HP-UX B.11.31.

 
SOLVED
Go to solution
HP-SBIDR
Established Member

Commands are not executing properly in one of our server HP-UX B.11.31.

Hi,

when i execute any command i am getting error that sh: not found

For example: ioscan

sh: ioscan:  not found.

But if i am executing the full path /usr/sbin/ioscan.It is working.

What will be the reason.Kindly provide solution.

 

2 REPLIES 2
Bill Hassell
Honored Contributor

Re: Commands are not executing properly in one of our server HP-UX B.11.31.

All commands must be run with a full pathname such as /usr/bin/bdf or /usr/sbin/ioscan. HP-UX (like all other Unix-like flavors and even the DOS cmd line) provides a shortcut in the form of an environment variable. The variable is named PATH and is set when you login from the file /etc/PATH. The contents of PATH are a set of colon (:) delimited paths that are searched when you don't precede your command with a path.

You can edit the /etc/PATH file and add /usr/sbin. NOTE: This is one long line. Make sure you just append the text to the end of the line. There must be only one colon followed by the new path. Then to set the new path, logout and log back in again.



Bill Hassell, sysadmin
HP-SBIDR
Established Member
Solution

Re: Commands are not executing properly in one of our server HP-UX B.11.31.

Thanks Bill. Now working fine......