Some easy to forget little knowledge points

Source: Internet
Author: User

Since it is often done on Linux servers, some of the frequently used commands are always forgotten and are now logged:

1. Often forget the use of a command, the habit of using man, but use Help to query the use of this command is more intuitive.

2.history, use this command to clean up some very sensitive information (such as passwords, user names, etc.).

History-c means cleaning up all of the history records.

history-d num Specifies to clean up that history

  In the/root/.mysql_history file, there are a number of previously executed MySQL commands

3.tree view some files in a directory to see more intuitive

4. Mkdir/data2/{2,3}.log creates 2.log and 3.log consecutively under the Data2 directory

5. On the MySQL command line interface, use prompt \[email protected] \r:\m:\s--> to change the command line interface of MySQL so that it can be clearly identified on that machine, the effect is as follows:

1 mysql> prompt \[email protected] \r:\m:\s-->2set'\[email protected] \ r:\m:\s-->'3:4:  5:----

Some easy to forget little knowledge points

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.