centos-shell-Special Characters

Source: Internet
Author: User
Tags parent directory

Shell wildcard characters

# notice is completely different from regular, similar to regular

  * any of at least one character

 ? Any one character

  [ ] [] any one of the characters, the relevant character set a-Z 0-9

Shell redirection

# re-designation of system standard input, standard output, standard error output

  Enter Redirection < <<

# number 0, can be omitted

Change the shell's input source, either terminal input or file input, to append content to the file, etc.

  Output REDIRECT > >>

# number 1, can be omitted

REDIRECT the Shell's screen output to the specified file

> Coverage

>> Append

  Error redirection 2> 2>>

# number 2, not omitted

REDIRECT the Shell's error output to the specified file

2> coverage

2>> Append

  Common

Correct and Error output redirect override mode 2>&1 &>

Correct and error output redirect append mode 2>>&1 &>>

   # for timed tasks, shell script logs, or no concern for Shell output Redirect to/dev/null

Shell Pipeline |

The output of the previous shell as input to a command behind the pipeline

Shell escape character \

1. Precede the special single character, ignoring the character's meaning

2. The form wraps, the command line does not write, the other line again writes, essentially is a line command

Shell single quote ' '

WYSIWYG, ignoring the meaning of all special characters in a character

Shell double Quote ""

Special characters are escaped

Shell anti-quote ' '

Try to run the returned output with the characters in the command mode, and the same as $ ()

Catalog file Related

  / root directory

  CD Command related

The current directory .

Parent Directory :

Current User home directory ~

Last working directory -

  {} Create files, directories, backup files, rename using

From a certain start to an end, the range can be an integer greater than 0 or a-Z-A-range {start}. End

Touch {A.. C}.txt

Add a suffix to a file or directory to back up files or rename files or directories {, name}

MV Scripts{,.new}

  

Shell History Command related

  ; Split two commands

 ! Call History Command, Federated history Use, can be directly historical command number execution or command name execution, command name execution then execute the latest command

User-related

  # Super User

  $ Normal user, also gets the value of the corresponding variable in the user shell

centos-shell-Special Characters

Related Article

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.