Using Advanced Redirection with stderr

Throughout this book, we’ve been redirecting input to output, piping the output of one command to the input of another, and generally getting fairly fancy. Can you believe that there’s even more you can do with redirection?

Unix provides three channels (technically known as file descriptors) for communication between the user and the system:

  • Standard input (stdin), which refers to providing information at the shell prompt or accepting information from a different program.

  • Standard output (stdout), which refers to the output you see whirring by on your screen after you issue a command—for example, if you issue the command find / -name test.

  • Standard error (stderr), which includes error messages you might see ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.