Linux text editing software management

Source: Internet
Author: User

GERP command:

grep is a powerful text-search tool that views text files line-by-row, and if a matching pattern is found, all rows containing this pattern are printed, and grep supports regular expressions

1 grep option mode is searched for files:

grep root/etc/passwd

            

Ls/var/log/|grep Log # Find files with log under/var/log/| is a pipe character

        

Gret Common parameters

      

-C does not print the contents of matching rows, but prints the number of matching rows grep-c sudo/var/log/secure

          

-I case-insensitive match grep-i onboot/etc/sysconfig/network-scripts/ifcfg-e*

-N Displays the line number of the matched line Grep-n PATH ~/.bash_profile

-V prints rows other than matching rows

Common Regular Expressions:

^ matches the beginning of the string

$ matches the end of a string

. Any single character

. * Any character

^$ Blank Line

About VIM:

Brief introduction:

VI is a highly configurable cross-platform text editor, supporting Linux, Windows, Mac, using it to build, modify files, Vim is the enhanced version of VI, and VI is fully compatible, and 2 are free software

      

Vim's design philosophy: command combination, mode switching

VIM installation: Yum install vim

VIM command format: $vim [filename] filename is the file to be edited, and if the file does not exist, a new file is created

Three modes of VIM:

Command mode: Enter the "Vim file name" in the Linux terminal to enter the command mode, but cannot enter the text

Edit mode: Press I in command mode to enter edit mode, you can edit the file, press ESC to return to command mode

Last line mode: Press in command mode: Enter the last line mode, there will be a colon in the lower left corner, at this time can be typed in the last row mode support command and execution, such as: Wq save exit: Q Do not save exit: wq! Force Save exit

Vim edit mode:

      

Simple common Command mode:

Vim Command mode:

      

Vim last-line mode:

      

Vim FAQs:

      

Download software to resolve rpm dependencies: Yum:

          

Compile and install:

        

Compile and install Python3:

         

Linux text editing software management

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.