Streams

karthik · created · flag

Think of a channel that’s a continuous stream of data. Streams is a concept in computing to describe the input and output streams of data. The basic I/O streams are as follows.

  1. stdin - Standard input. Keyboard.
  2. stdout - Standard output. Terminal.
  3. stderr - Standard error. Error log.

In Linux and other unix-like operating systems, open files are associated with an abstract number known as the file descriptor. And the above three streams are by default associated with the the integers (file descriptors) 0, 1, and 2.

Knowledge of file descriptors and I/O streams would help you understand some command line tasks like redirection and piping, which you will find in the next lesson, better.