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

UNIX command to display cmd history

Reply to Message Icon

Original Message
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


Report Offensive Message For Removal


Response Number 1
Name: jimbo
Date: September 21, 2002 at 12:21:41 Pacific
Subject: UNIX command to display cmd history
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 2
Name: Sue
Date: September 21, 2002 at 14:11:35 Pacific
Subject: UNIX command to display cmd history
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 3
Name: Riman Moses
Date: September 23, 2002 at 11:45:01 Pacific
Subject: UNIX command to display cmd history
Reply: (edit)

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

Moses


Report Offensive Follow Up For Removal

Response Number 4
Name: ramadog
Date: September 25, 2002 at 16:40:15 Pacific
Subject: UNIX command to display cmd history
Reply: (edit)

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


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: UNIX command to display cmd history

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software