Repeating commands using the r alias

Use the r Korn shell alias to repeat previous commands.

Type r, and press Enter, and you can specify the number or the first character or characters of the command.

If you want to list the displays currently available on the system, type lsdisp at the prompt. The system returns the information on the screen. If you want the same information returned to you again, at the prompt, type the following:
r

The system runs the most recently entered command again. In this example, the lsdisp command runs.

To repeat the ls *.txt command, at the prompt, type the following:
r ls

The r Korn shell alias locates the most recent command that begins with the character or characters specified.