- A command prints its result to stream 1 and its error messages to stream 2; the terminal shows both interleaved.
>and>>redirect stream 1,2>and2>>stream 2. A single sign wipes the file before the command starts; a double one appends to the end.- Both streams in one file is
> file 2>&1, and the order matters. An unwanted stream goes to/dev/nullonce you know what is in it. - At the start of the lesson the access refusals went to stream 2, and
>took only stream 1 into the file — that is why the messages stayed on the screen.
Step 6 of 6 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson