Quick Tip
Master `tee` for Simultaneous Output and Logging
Challenge: You’re running a command and need to see its output in real-time on your terminal, but also want to save that same output to a log file for later analysis.
The Solution: Utilize the `tee` command to split the output stream.
your_command | tee output.log
Why it works: The `tee` command reads from standard input and writes to standard output and one or more files simultaneously. This allows you to view the output live while ensuring it’s also captured in a file.
Pro-Tip: Use `tee -a` to append to the log file instead of overwriting it.
Linux Tips & Tricks | © ngelinux.com | 5/1/2026
