History commands in Linux

Source: Internet
Author: User

The history commands in Linux are generally saved in the user???? /root/.bash_history

History Options Historical Command Save folder

Options

???? -C: Empty history command

???? -W: Write History command in cache to history command to save file/root/.bash_history

The commands you see in. bash_history are not exactly the same as what you see with the history command. What you see in the. bash_history file is the command that was saved after the last logon logoff, and the command that Histroy saw that included this login execution

1. Write the command in the cache to the history command to save the file

[Email protected] ~]# history-w

2. Clear historical order

[Email protected] ~]# history–c

3. The history command has to be called

???? Use the up and down arrows to invoke previous history commands

???? Use! N Repeating nth History command

???? Use!! Repeat the previous command

Use! Character to re-execute the last command that starts with the string

?

History commands in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.