Skip to content

Glossary: Node.js Basics

2> (redirect stderr)

Also written: > redirect, redirect

In the terminal, `>` sends a program's stdout to a file and `2>` sends its stderr to a file. For example, `node stock-report.js > report.txt` puts the table in the file while error messages still show on screen.

Where the book teaches it

Related terms

stdin / stdout / stderr/dev/null