December 2018
Beginner
452 pages
12h 17m
English
The final thing we find noteworthy to describe in regards to exclamation marks is interacting with the history. As you learned just a few pages ago, the history saves your commands. With the exclamation mark, you can quickly run commands from your history: either by supplying the number of the command (for example, !100) or by entering part of the command (for example: !ls). In our experience, these functions are not used as much as the reverse search we'll explain shortly, but it is still good to be aware of this functionality.
Let's take a look at how this looks in practice:
reader@ubuntu:~$ history | grep 100 1100 date 2033 history | grep 100reader@ubuntu:~$ !1100dateSat Dec 22 19:27:55 UTC 2018reader@ubuntu:~$ ...