$
Linux Practice
Practice
Tutorials
English
한국어
日本語
中文
terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user
@linux:
~
$
tee - Split Output
Reset Lesson
Learn to use tee to send output to both the screen and a file simultaneously.
Step 1
Use tee to write "hello" to output.txt while also displaying it on screen.
Type: echo hello | tee output.txt
echo hello | tee output.txt
Step 2
Verify the file was created by reading output.txt with cat.
Step 3
Append "world" to output.txt using tee -a (append mode).
Step 4
Check output.txt to verify both lines are there.