View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Stream

From LQWiki

Jump to: navigation, search

In Unix and Unix-like operating systems, the fundamental concept of the stream exists between running applications. A stream is a dedicated channel of data which is reserved for some particular use. It suffices to think of streams as special pipes or channels in and out of a certain program.

All programs in Unix can access three standard streams:

  • a standard input stream, stdin - for reading data
  • a standard output stream, stdout - for outputting data
  • a standard error stream, stderr - for reporting errors

This kind of construction is useful in piping programs together. This means that the output pipe of one program is connected up to the standard input stream of another - allowing for a modularity that comes to all programs which make use of this mechanism.

The distinction of a standard error stream is useful in that it allows the more efficient diagnoses of errors in a long pipeline, which may not be seen if error messages are included with standard output. See stderr for more.


Share

Personal tools