Special symbols:
> or 1> output redirection: The output from the front is entered into the file behind, it clears
The original contents of the file.
>> or 1>> Append output redirect: Append the front output to the file in the back, not clear
Except for the original contents of the file.
0< or < input redirection: Input redirection is used to change the input of the command, followed by the specified input
Content, preceded by the file name.
0<< or << append input redirection: followed by a string to identify "end of input", or to
Use Ctrl+d to end the input.
2> Error Redirection: The error message is entered in the back of the file, it will delete the original
Have content.
2>> Error Append redirect: Appends the error message to the file behind it and does not delete
The original contents of the file.
Description
1, arrow pointing is the flow of data.
2. Digital description
1. Standard input (stdin): code 0, use < or <<. Data flows from right to left.
2. Standard normal output (STDOUT): Code 1, use > or >>. Data flow from left to right
3. Standard error Output (STDERR): Code 2, using 2> or 2>>.
This article from "linux-studying" blog, declined reprint!
Linux-Special Symbols