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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get back the previously typed command in the screen?

Status
Not open for further replies.

CALYAN

Programmer
Apr 23, 2001
39
US
I want to get an command previously typed by pressing arrow
key how to do it?
 
If u running ksh use esc+k key combination. make sure that ur $SHELL=ksh.
or
ksh -o vi
 
The reason why Esc+k works, is because the following lines have probably been added to your .profile file:

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

 
If you really want to use the arrow keys then run "keysh" which is an extension of the standard Korn-shell.
 
On POSIX shell, try 'set -o vi'
then use Esc + K

Does it work too?
 
If your logged on as root you can just press "r".

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top