Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't use the history functionality

Status
Not open for further replies.

ehspacl

IS-IT--Management
Feb 11, 2002
54
GB
I thought I was using the POSIX shell with path /sbin/sh ,

but for some reason I can not use the history command, or ESC-k. I can however use 'vi' line editing commands when data is already on the line.

Why would this be?
 
I personally use the /bin/sh, I thought this was the posix shell, and is the default when creating users.
To check you have the history set up you must have some files in your home directory:
.sh_history with the permissions 600 for your user.
You of course could try adding this file to see what happens anyway?
With regards
 
I have .sh_history with permissions 666 already.
But it can only be written too, when I use another shell.

E.G.
The .sh_history file will only be appended too, when I invoke another shell other than the POSIX shell.

Any ideas?
 
Do you have the following in the .profile?

export EDITOR=vi
export HISTSIZE=100
export HISTFILE=~/.sh_history

Regards,
George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top