the shell can often be seen: >/dev/null 2>&1
The result of the command can be defined in the form of a%> output
/dev/null represents an empty device file
where does the > delegate redirect to, for example: echo "123" >/home/123.txt
1 means stdout standard output, the system default is 1, so ">/dev/null" is equivalent to "1>/dev/null"
2 indicates stderr standard error
& means equivalent to, 2>&1, 2 output redirect equals 1
then the statement in the title of this article:
1>/dev/null First indicates that the standard output is redirected to an empty device file, that is, not outputting any information to the terminal, which is plainly not displaying any information.
2>&1 Next, standard error output redirect = = The standard output is also redirected to an empty device file because the standard output was previously redirected to an empty device file.
Common >/dev/null 2>&1 explanation