In Linux/unix, the information generally seen on the screen is from stdout (standard output) or stderr (standard error Output). Many people will ask, output is output, sent to the screen does not have, why is divided into stdout and stderr it? That is because in the server environment, almost all of the programs are run in background, so, in order to facilitate debug, generally in the design process, the STDOUT sent to/saved to a file, the wrong information stderr saved to different files.
Which is the normal output, such as the time the program started running, the number of people now on the line, and so on.
What are the incorrect output, such as the inability to find the URL that the user wants to go to, or the failure of credit card authentication?
With the above cognition, what is >/dev/null
This is the stdout sent to/dev/null.
What is/dev/null,/dev/null is the "bottomless pit" in Unix/linux
Any output sent to the "bottomless pit" is no longer. Trust me, it's gone!
Then someone asked, under what circumstances should the output be sent to the bottomless pit?
There are no standard answers,
However, in general, if you do not want to see output or output too much, it is possible to crush the hard disk, the design of the program will consider to send output to/dev/null.
The meaning of >/dev/null in shell scripts