History clears historical records or history does not record historical commands

Source: Internet
Author: User
# VI ~/.bash_history

Clear the record inside and exit the current shell

# exit (be sure to exit the current shell) # History    1  vi ~/.bash_history     2  |grep mysql    3  clear    4  VI ~/.bash_history     5  echo "" > ~/.bash_history     6  VI ~/.bash_history     7    History 8  Exit    9  history# before the content is emptied!!!
[Email protected] ~]# history    1    2  echo "" > ~/.bash_history     3  history[[ Email protected] ~]# history-c #也可以清空历史命令 [[email protected] ~]# history    1  

History does not record historical commands:

#vi/etc/profile#histsize=1000histsize=6 #记录历史命令的条数; histsize=0 is not recorded

Remember to re-load:

# Source/etc/profile

History clears historical records or history does not record historical commands

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.