Re-running a command from the history list

To run a command from the history list use a command from this table.

To... Do this...

Move up through the command ^P history list one command at a time.

Move down through the command ^N history list one command at a time.

Run the previous command. !!

Run command number n. !n

Run most recent command !string starting with characters in string.

Run most recent command !?string containing characters that match string.