Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to quickly view history by Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Linux how to quickly view historical records", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux how to quickly view historical records" this article.

In Linux systems, two keystrokes are commonly used to view history:

Up Arrow: look forward in chronological order for used commands, one command for each press

Down Arrow: look back for used commands in chronological order, advancing one command each time you press.

If you think it takes too much time to enter one command at a time with the arrow keys, you can also use the search method:

Ctrl + R: used to find used commands

For example, if I look up the command date, I can use Ctrl + R, press enter, and then enter only da. Because I have used the command date before, it automatically completes the date command for me, as shown below:

History command

History means "history, historical record" in English.

The command history is used to list all previously used commands, as shown in the following figure:

As you can see, the system automatically saves the 31 commands I have entered in the terminal since I installed Ubuntu, the most recent of which is history.

The history command makes it easy for us to know which commands we have typed before.

Also, the used commands listed by history are numbered, as shown in the figure above. If you want to rerun the corresponding numbered command, you can use! A format like numbering.

For example, in my case,! 30 will run the date command again, because in the screenshot above, we can see the imperative date numbered 30.

The above is all the contents of the article "how to quickly check the History of Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report