Standard output redirection 2 for linux
There are three standard IO,stdin,stdout,stderr in Linux, and the corresponding file descriptor is 0Person1, Person2.
2 > & 1 means to redirect standard error to standard input.
Why do you need a & symbol because & it must be followed by a file descriptor
Otherwise, 2 > 1 means to redirect standard error to a file with a file name of 1.
1 > / dev/null means to redirect standard output to a / dev/null device file, and null represents an empty device file, which can be understood as null is a bottomless pit.
So 2 > & 11 > / dev/null, this sentence redirects standard error to standard input while standard output is redirected to a / dev/null device file, that is, stdin/stdout is redirected to a / dev/null device file.
Examples are as follows:
Xxx_process 2 > & 1 1 > / dev/null &
Start a process named xxx_process to redirect the output log it is running to the / dev/null file
That is, in this process, printf cannot print log, and the process runs in the background.