Linux Common commands

Source: Internet
Author: User
Tags first string

How to create a new file (three types listed below)

1. Touch New file name

2, Cat > New file name (can enter text content directly by Ctrl+d exit)

3. Vim New file name

Since the mention of Vim, this is a must to grasp the V

Three modes of vim: command mode , edit mode , last line mode

How to use Vim to find a string ??

Use? Or

/followed by the found string. VIM displays the first occurrence of a string in the text.
Followed by a lookup string. VIM displays the last occurrence of the string in the text.

No use/or? After finding the first string, press ENTER, VIM highlights all matching text

Another problem

How to quickly find the information you want in the log???
1, the directory to jump to the location of the log file storage

2. grep keyword * This allows you to find information about all keywords and which log file

3, vi xxx.log into the log file

4,/keyword so you can find out the location of the keyword information in xxx.log

Linux Common 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.