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