Redirect
Sending a command’s output into a file: > overwrites the file, >> appends to it.
Not the same as a pipe
A pipe passes output onward to another command. A redirect parks it in a file — and with a single `>` it replaces whatever that file held, without asking.
Where it bites
`>` overwrites instantly and silently: there is no prompt, no undo, no trash. Pointing it at a file that already has something in it is one of the fastest ways to lose work in a terminal. `>>` appends and is the safe default when you are unsure.
Covered in these lessons
Related terms
Where this comes up
Also written as redirect, redirection. Checked 2026-08-06.