|
Blue Forest http://www.lslnet.com at 4:28 p.m. on August 18, 2006
|
|
/dev/null Consult on the issue and /dev/zero
|
|
I have seen many people used /dev/null, /dev/zero the very sporty, but it sometimes unexpected effect, but I do not understand how this principle is two things?
Please help me to know the brothers explain, the best example to the point. Thank you! ! !
|
|
|
Re : /dev/null and /dev/zero questions.
|
|
Approximate former black hole, throw away the money directly into the latter similar to the air, although nothing could not see, in fact non-existent
|
|
|
Re : /dev/null and /dev/zero questions.
|
|
/dev/null For general objectives into, not in keeping with the discarded;
/dev/zero Generally used for initialization 0 sources.
For example : Startx &> /dev/null (Discarded contents of the output startx)
Dd if=/dev/zero of=/tmp/0.dat count=10 bs=1 (Generating a 0.dat, where 10 to 0, x /tmp/0.dat od can be used to check the contents)
|
|
|
Re : /dev/null and /dev/zero questions.
|
|
Dev/null, nicknamed called a bottomless pit, you can export it to any data, it takes all, and are not you going to be able to! /dev/zero Is an input device, you can use it to your document initialization. It exports to /dev/null do? For example wrong! /dev/zero Do not try to export /dev/null You can accept any output, and everything lost. /dev/null------ It was empty of equipment, also known as spaces barrels (bit bucket). It will be included in the output of any abandoned. If one does not want to standard output display information or document. Redirection information will then be available barrels. /dev/zero------ The equipment to provide endless 0 can be used any number -- you need to provide more equipment and more. He can be used to the equipment or documents into the string 0.
|
|