Name: Sue Date: September 21, 2002 at 12:08:26 Pacific Subject: UNIX command to display cmd history OS: UNIX CPU/Ram: unknown (work)
Comment:
Major brain fade here ... there is a Unix command that will list the history of commands during a session (I thought it was .sh_history, but was proven wrong). I've also forgotten the Unix command that is similar to DOS's doskey that will allow me to scroll through previous commands. Any assistance is appreciated!!! Thanks! Sue
This is dependent on the shell you use. ksh uses the .sh_history as mentioned above. Also, when using ksh, if you type "set -o vi" at the prompt, you can scroll through previous commands by pressing ESCAPE, and then the letter "k" - This uses vi as your line editor though, so you should know how to move around in that pretty well.
I think you might want to use the bash shell if available because it allows you to use the arrow keys (ksh requirs remapping keys). Last, i believe the history file is .bash_history. Hope this helped,
Thanks Jim! I took Unix and Unix Admin 2 years ago and I've forgotten much - time to break out my old textbooks and refresh my memory! Thanks again! Sue