Send output to both a file and the terminal.
Section: Viewing and Text Basics
Write output to file and stdout
bash
bash
make 2>&1 | tee build.logExplanation
Great for preserving command output while still seeing it live.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Viewing and Text Basics