To view a listing of commands you entered in ksh, type
$ history
To re-run the last command
$ r
To re-run command by its number
$ r number
To re-run command by the starting text of the command
$ r string
Examples
$ r
$ r 34
$ r hist