cancel
Showing results for 
Search instead for 
Did you mean: 

iam not getting histoty

RAKUNTA
Frequent Advisor

iam not getting histoty

hi i am new to hp-ux .in my system i have 11iv3 b.11.31. if log in as a root i am not getting a history of commands.
as a user i am getting history of commands.....
and hp will support bash r are not ????
please give me a advise.
7 REPLIES
singh sanjeev
Trusted Contributor

Re: iam not getting histoty

as root you can see history with :
do esc and to navigate :HJKL ;left,up,down,right
Sanjeev Singh
singh sanjeev
Trusted Contributor

Re: iam not getting histoty

Hp will support bash r are not ????

Yes bash is supported by HPux
Sanjeev Singh
singh sanjeev
Trusted Contributor

Re: iam not getting histoty

if you not see them as root ,then check with env command whether HISTORY has been set for root or not.
Sanjeev Singh
James R. Ferguson
Acclaimed Contributor

Re: iam not getting histoty

Hi:

In root's '.profile' add these lines:

export EDITOR=vi
export HISTFILE={HOME}/.sh_history

Logout and login again.

While you can use the 'bash' shell, whatever you do do not make it the default shell for 'root' by changing the '/etc/passwd' initial program specification from '/sbin/sh' to *anything* else. If you do, your server will be un-startable.

Regards!

...JRF...
RAKUNTA
Frequent Advisor

Re: iam not getting histoty

Mr.sanjeev thanks for ur reply. but how can i get bash .
Steven Schweda
Honored Contributor

Re: iam not getting histoty

> [...] hp will support bash r are not ????

> Yes bash is supported by HPux

You can use "bash" on HP-UX, but that does
not mean that HP supports "bash".

> [...] but how can i get bash .

Did you try a Web search for keywords like,
say:
bash hp-ux
?
Bill Hassell
Honored Contributor

Re: iam not getting histoty

bash is not part of the installation for HP-UX. It can be found for 11.31 at the HP-UX Porting Centre:

http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.1.005/

NOTE: this is not a complete package but requires additional packages: gettext libiconv termcap. Be sure to read the documentation.

If you login as root, the shell will be the POSIX shell (/sbin/sh) and as mentioned above, must remain as this shell. BASH and the POSIX shells are fairly similar although there are a number BASH-only features that you will need to know. The POSIX shell and the Korn shell (/usr/bin/ksh) are much closer in terms of features.


Bill Hassell, sysadmin