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

来源:互联网 发布:sql注入实例 编辑:程序博客网 时间:2024/03/29 23:35

一直对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:


原创粉丝点击