Site icon LinuxCommands.site

6 methods of executing historical commands in linux bash

Many times when we use the Linux command line, we need to find the used commands.

At this time, you usually like to use the up and down arrow keys or the history command to find the previously used command.

In this article, I’d like to share with you some quick search history command methods that you don’t know.

6 methods of executing historical commands

Examples

skill -1

Like the above command, you can see that I typed !! . Actually, I repeated the last command ls.

skill -2

As the above command, you can see that three rm commands have been typed, and input !r, which matches the last rm -rf t3.log command.

skill -3

With the above command, history sees the number of history. Typed !6532 to execute ll with the number 6532.

skill -4

skill -5

skill –6

Exit mobile version