Data Flow redirection: is a command that should appear on the screen after the data transfer to other places.
Standard input (stdin): code 0, using < or <<;
Standard output (STDOUT): Code 1, using > or >>;
Standard error Output (STDERR): Code 2, using 2> or 2>>
One: Standard output
>:1 file does not exist will be automatically created
2 file exists, empty the file first, then write the data to
3 If the content already exists in the file, overwrite the contents of the file (if you do not want to overwrite it, use >> append to the original text)
Two: standard error output
2>: Output the wrong data to a specified file or device in an overridden manner
2>>: The incorrect data is output to the specified file or device in an additive way
>list_right 2>list_error
Attention:
1:/dev/null Garbage bin Black hole
How to filter out error messages and output the correct information??
#find/home-name. BASHRC 2>/dev/null
2: How to write the correct error message to the same file??
#find/home-name >list 2>&1/home-name &> List
Both of these methods can be
Three: Standard input
The simplest way to do this is to change the way the keyboard input is used instead of the file content.
Cat > a < /root/b
Writes the contents of B to a
Shell---Data flow redirection