关于STDIN,STDOUT,STDERR的图解分析

一直对linux中的标准输入输出没有理解的很清楚,发现网页中的一个图例说得很清楚,就转了,做个记录

转:http://scmbob.org/conclusion_of_io_redirection.html

Furthermore:

Following picture gives a very clear defination of what is stdin stdout and stderr:

#  In Linux everything is a file.
# Your hardware is also a file:
* 0 - Input - Keyboard (stdin)
* 1 - Output - Screen (stdout)
* 2 - Error - Screen (stderr)


# For standard input:


# For standard output:


# For standard error:


你可能感兴趣的:(关于STDIN,STDOUT,STDERR的图解分析)