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!

command history.

Status
Not open for further replies.

dbase77

Technical User
Apr 23, 2002
591
IE
Hi all.

In solaris 8, is there any key that I can use to retrieve history command (command that I type before)?

regards,
Feroz
 

hi,

depends about the shell that you use

I'm using /usr/bin/bash
it knows about history.
you have to use just arrow up

or with `!'
For example command `!net'
will give you the last command that you run which begin with `net'
for me usually this is `netstat'

PM

 
Hi,

Thank you for replying. Im using ksh and sh shell. How do I go about this?

Thank you.

regards,
Feroz
 
Hi Feroz,
in ksh you can do
$ set -o vi
after that if you want to see history command press Esc and you can scan (and correct command) by pressing letter 'k'.
The same effect if you do
$ export VISUAL=vi
you can add this line to your .profile
Regards Boris
 
for ksh
`history' will give you the last 128 commands

`r string' run the last command which begin with `string'

`r' - the prev command



 
Hi all,

Thank you for your help.

regards,
Feroz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top