In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you about linux view history command syntax, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
Linux View History command
In Linux, the history of bash input will be stored in the .bash _ history file. The history command is mainly used to display the contents of the historical instructions and issue the instructions in the historical records.
Use: first open Terminal (terminal); then type history and hit enter; the screen will display 1000 historical commands.
Command syntax:
History [n] history [- c] history [- raw] histfiles
Parameters:
N: number, to list the most recent n commands-c: eliminate all the history contents in the current shell-a: add the newly added history instructions to the histfiles, if there is no histfiles, then the default write ~ / .bash_history-r: read the contents of the histfiles into the history memory of the current shell-w: write the current history memory to the histfiles.
Common commands:
History N displays the most recent N commands, such as the history 5 history-d N delete section N command, which is the previous number For example, history-d 990 history-c empties the command history history-a writes the command history in the current session to the specified file echo $HISTFILE use this command to view the environment variable # echo $HISTFILE / root/.bash_historyecho $HISTFILESIZE to view the maximum number of saves export HISTTIMEFORMAT='%F% T'so that history can have a time stamp to show all the contents of the historical command syntax in 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.
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.