Operating System - HP-UX
1834778 Members
3319 Online
110070 Solutions
New Discussion

Re: about history command

 
SOLVED
Go to solution
shan_7
Advisor

about history command

Hi everybody,

How to enable the history? I made entry for variable in .profile file in Home directory.
But after exporting aslo next login its not working

HISTFILE=/home/user/.sh_history
HISTSIZE=100
export HISTFILE

help me how to enable this permantently while login..


Shankar
9 REPLIES 9
KapilRaj
Honored Contributor
Solution

Re: about history command

Insert the following also in your .profile
ksh -o vi

And re-login ..

Kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: about history command

Geoff Wild
Honored Contributor

Re: about history command

Make sure user has write access to their home directory...

You don't need HISTFILE (unless you are root). The default is to use $HOME/.sh_history (see man sh-posix).

What shell is the user using?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
R. Sri Ram Kishore_1
Respected Contributor

Re: about history command

Hi Shankar,

Even "set -o vi" will do the job for you. As Geoff has rightly pointed out, .sh_history is where your command history is stored.

HTH.

Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."
Muthukumar_5
Honored Contributor

Re: about history command

Hai,

We can use the history of commands usage from csh shell.
Default location of HISTFILE is /home/.sh_history. The users wants to use the histroy of commands has to have the full permission on /home/ directory.

If you want to have default history enablement after the startup,make changes on the /home/USER/.profile file.
To enable the history on shell use as like "set -o vi" or "ksh -o vi" with your HISTFILE options on that .profile file

See ksh man page for HISTFILE and command Re-entry part to know about this history of commands.

Regards,
Muthukumar
Easy to suggest when don't know about the problem!
Jose Mosquera
Honored Contributor

Re: about history command

Hi,

Pls consider the following environment definition into your .profile:

EDITOR=vi; export EDITOR
HISTFILE=/.sh_history; export HISTFILE
HISTSIZE=10000; export HISTSIZE

Rgds.
SAHA
Honored Contributor

Re: about history command

Check this link:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=59366
thanks,
You must PASS failure on way to success !!!
RIACDC
Occasional Contributor

Re: about history command

Shankar,

This is Don Conway......are you the shankar I worked with at Fisher Controls in Marshalltown, Iowa?

Don
RIACDC
Occasional Contributor

Re: about history command


Shankar,Ganesh

This is Don Conway......are you the shankar I worked with at Fisher Controls in Marshalltown, Iowa?
Don donald.conway@chra.army.mil