The meaning of >/dev/null in shell scripts

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.