Historical command History

Source: Internet
Author: User

The history command is saved in the user's home directory ~/.bash_history after the user logs off

History #查看系统中 the historical command for real-time caching , not exactly the same as the content in. bash_history

History-c #清空历史命令

History-w #把缓存中的历史命令写入历史命令保存文件. bash_history

The storage capacity of historical commands can be changed in/etc/profile by adding histsize=1000.

Invocation of the history command:

Use the up, down arrows or ctrl+p, CTRL + N

Use!n to perform nth history commands

Use!! Executes the previous command

Use! String to execute the most recent command that starts with the string

Using the Ctrl+r Query history command

Historical command History

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.