CertGrid CertGrid
Hands-on Lab·LPIC-1

Streams, pipes and redirection

Topic 103 is weight 23, the largest on either paper, and this is its foundation. A pipe carries standard output and nothing else, which is why a command that prints an error to a pipeline appears to lose it. This guide proves that with a command that writes to both streams at once, then shows the redirection order that catches people out.

101: GNU and Unix Commands Guide 8 of 33 Beginner

One Debian-family host. Every command runs in a directory created and removed by the page, and nothing outside it is touched.
Server NameIP AddressOSRolesCPURAMHDD
LPIC1-A01192.168.0.76Ubuntu 26.04 LTSDebian-family host - dpkg and apt, which objective 102.4 names2 Core4 GB50 GB

This guide includes

Use this for the foundation of the largest topic on either paper. This matters because a pipe carries stdout and only stdout - and swapping two tokens sends the errors somewhere else entirely.

Before you start

  1. A file to work on

  2. A pipe carries stdout, and only stdout

  3. Order matters, and this is the question people miss

  4. tee, for when you need the output twice

Official sources