Table of Contents

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.

Operator

Generally, a redirection goes:

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

See: