Linux symbols, shortcut keys, regular

Source: Internet
Author: User
Tags clear screen egrep

Liunx Common Symbolic meanings

: Delimiter for multiple commands

/root or path delimiter

> Standard output redirection (flow of data flow toward arrow), overwriting the original file

>> Chase Emphasis (data flow toward arrow direction), then the original file "End", "append" content

<or< standard input redirection: input redirection for changing the input of the command, specifying the input, followed by the file name

<<or<< input redirection: followed by a string to indicate "input end" or ctrl+d to end the input

.. Parent Directory

~ User Home Directory

| Pipeline, handing the output of the previous command to the next command and then continue processing

! Add the line number of the history, and execute the corresponding command. Add a letter to execute the most recent command that starts with the corresponding letter

The PATH environment variable is capitalized, and all the paths contained within the environment variable can be directly knocked out to execute.

Global entry into force in/etc/profile, normal user effective ~

Linux Common shortcut keys

CTRL + a jumps to the beginning

CTRL + E jumps to the end

CTRL + C interrupts the current program

CTRL + D logoff

CTRL + L Clear Screen

CTRL + U Clear (cut) cursor before

CTRL + K Clear (cut) cursor after


Regular expressions

Simply put, a regular expression is a set of rules and methods for handling strings. We can quickly filter and replace certain strings by using special symbolic assistance, which is used to manipulate strings in behavioral units.

Operation and maintenance work, there will be a large number of access logs, error logs, big data. How to quickly filter out the content we need depends on regular expressions.

Awk,sed,grep (Egrep) Three Musketeers to be able to work more efficient, it must be inseparable from the regular expression of the cooperation. If we want to play three Musketeers, we must first master the regular expression.

Regular expressions in the Liunx. It is mainly the regular expression of awk, sed, and grep (Egrep) Three Musketeers.

The regular expression is actually some special character that gives him a specific meaning.

Basic Regular expression: BRE

1. ^word search for Word starting with

2. word$ search for the end of Word

3.. Represents and can only represent any one character

4./Escape symbols, let the characters with this special meaning take off the vest, display the prototype

5. * Example ol* repeat 0 or more of the preceding one character

6. * Match All characters

7. [] Character set for repeating special characters "or"

8. [^word] configuration does not contain the contents of any characters in parentheses

9. A\{n,m} repeats N to M times, before a repeating character

A\{n,} repeats at least n times, previous repeating character

A\{n} repeats n times, before a repeating character

Extended Regular expression: ERE

1. + Repeat one or more of the preceding characters (egrep or GREP-E support, grep does not support, turn the front multiple separators into one)

[[email protected] ~]# echo----1:-------2 |awk-f ' [-:]+ ' {print $} ' output is 2

2.? Repeat 0 or one of the 0 preceding characters

3. | To find multiple conforming strings in a method or

4. () find the "user group" string


This article is from the "Bran" blog, make sure to keep this source http://branguo.blog.51cto.com/9768383/1595200

Linux symbols, shortcut keys, regular

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.