In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about the use of linux history commands to display and manipulate historical commands. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The history command is used to display historical commands that the user has executed before, and can append and delete historical commands.
If you often use the Linux command, then using the history command can effectively improve your efficiency.
Syntax format: history [parameters] [directory]
Common parameters:
-an appends the history commands of the current shell session to the command history file The command history file is the configuration file that saves the history command-c clear the current history command list-d delete the command number specified in the history command list-n read the history command that was not read at the beginning of this Shell session from the command history file-r read the command history file to the current Shell history command memory buffer-s add the specified command to the command history memory buffer as a separate entry. Delete the last command in the command history memory buffer before adding-w writes the contents of the current shell history command memory buffer to the command history file
Reference example
Show the last 10 commands:
[root@linuxcool ~] # history 10
Write the login command to the history file:
[root@linuxcool] # history-w
Read the contents of the command history file into the current history memory of shell:
[root@linuxcool ~] # history-r
Appends the history commands of the current Shell session to the command history file:
[root@linuxcool] # history-a
Clear the list of current historical commands:
[root@linuxcool] # history-c on the use of linux history command display and manipulation history command is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.