Kolam Ayer MakersLinux Foundations

tee

Use

history | tail -30 | tee ~/playground/history.txt

What It Does

tee writes a stream to a file and still prints it to the terminal.

Practice

Use it when you want evidence saved without losing what you see on screen.

Watch Out

Plain tee file replaces the file. Use tee -a file to append.