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