# File descriptors and pipes

Week 4 · Processes · Operating Systems
The page also has an interactive playground: https://alfonsocampodonico.com/classes/operating-systems/pipes?lang=en
Code: https://github.com/AlfonsoCampodonico/os-playground/tree/main/src/sim (`gh repo clone AlfonsoCampodonico/os-playground`)

> See each process’s file descriptor table as the shell sets up ls | grep x > out.

This is how your shell (TP1) builds a pipeline: pipe(), fork(), dup2() and close(). Follow each process’s file descriptor table and the kernel’s open file table step by step.

**OSTEP:** chapters 5 and 39.

The playground above keeps its whole setup in the URL, so a link to this page reproduces the exact example. Change the inputs, step through it, and share the link.
