….~Unix and Linux~…..

All about Unix/Linux and myself

Enabling command history on HP-UX

with 3 comments

After installing HP-Unix you will notice that the command history is not working. That is pressing Esc+k returns nothings. If you execute the history command you will see error message like this:

sh: fc: Cannot access or open the history file.

You have to manually enable this feature. To do this add the following two line on your ~/.profile file and create the .sh_history file using touch command. Then log in again. You will see it is working.

HISTFILE=/.sh_history
export HISTFILE

Written by Ahmed Sharif

October 17, 2009 at 12:36 AM

3 Responses

Subscribe to comments with RSS.

  1. Thanks for this help,looking on how to do this and here is a great post on it.Thanks

    unix tutorial guy

    October 8, 2010 at 10:45 PM

  2. Thanx , i have tried very much but it is done now via ur post

    Thanx a lot,,

    Dharambir singh

    May 26, 2011 at 7:43 PM


Leave a comment