December 2018
Beginner
320 pages
8h 57m
English
The history command is used to display a list of previously executed commands prefixed with a command number showing the order of their execution, as shown in the following screenshot:

The exclamation point character (!) is a metacharacter in Bash, used for previously executed command expansion from history list on prompt.
The following table lists various history commands that are quite useful for beginners:
|
Command |
Description |
|
!<number> |
Expands to the command matching the specified number from history |
|
!<string> |
Expands to the most recently used command that begin with the string specified at the prompt ... |
Read now
Unlock full access