See this page as a slide show
- Most shells keep a history of the commands you have used.
This history can be used to save time by searching for commands
that you’ve already typed in.
history – list command history
- up arrow (↑), down arrow (↓) –
scroll up and down through history list
(might need to shift-up shift-down)
Esc-P, Esc-N – jump to line in history beginning with what
you’ve already typed
- Several symbols exist to speed things up.
!! – repeat last command
!a – re-do last command that begins with
!-2 – do the command two commands ago
- Pressing Tab while entering a path will attempt to complete the path
you have begun to type.
After you’ve summoned the old command using arrow keys,
you can modify it using arrows, backspace, and typing.
This is a great way to build up a command piece-by-piece.