Computing.Net > Forums > Unix > UNIX command to display cmd history

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

UNIX command to display cmd history

Reply to Message Icon

Name: Sue
Date: September 21, 2002 at 12:08:26 Pacific
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



Sponsored Link
Ads by Google

Response Number 1
Name: jimbo
Date: September 21, 2002 at 12:21:41 Pacific
Reply:

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,

-jim


0

Response Number 2
Name: Sue
Date: September 21, 2002 at 14:11:35 Pacific
Reply:

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


0

Response Number 3
Name: Riman Moses
Date: September 23, 2002 at 11:45:01 Pacific
Reply:

Jim did it. U got any major tips, share with me. I manage HP900 (HP UX-11).

Moses


0

Response Number 4
Name: ramadog
Date: September 25, 2002 at 16:40:15 Pacific
Reply:

On some system using the command 'history'
does what you want.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: UNIX command to display cmd history

Is there a unix command to do this? www.computing.net/answers/unix/is-there-a-unix-command-to-do-this/7479.html

unix command to open the xls file www.computing.net/answers/unix/unix-command-to-open-the-xls-file/6301.html

How to display a screen or window www.computing.net/answers/unix/how-to-display-a-screen-or-window/5610.html