IO - Redirection (of Standard Streams)

> I/O - (Input/Output|Read/Write) - Data Access

1 - About

Before a command is executed, its input (standard input stream) and output (standard output stream and standard error stream) may be redirected using redirection operators by the command line interpreter.

Redirection may also be used to open and close files for the current shell execution environment.

Redirection allows commands’ file handles to be:

  • duplicated,
  • opened,
  • closed,
  • made to refer to different files,

and can change the files the command:

  • reads from
  • and writes to.

3 - Method

Generally a redirection goes:

  • to a file
  • or to a program (chained), the standard output from an application becomes the standard output stream from an other).


4 - Documentation / Reference