Mission 34

Output redirection

Write simple command output into a safe lab file.

Terminal basics
7 minutes Core Lesson 34 of 360
echocat
Lesson 34 of 360 0/360 lessons 0/17 missions Terminal basics · 7 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 7 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Print status

Run echo status ok.

echo status ok
Write status

Run echo status ok > lab-status.txt.

echo status ok > lab-status.txt
Read status

Run cat lab-status.txt.

cat lab-status.txt
Lesson support

What to notice while you play.

Objective

Use one safe > redirection inside the home folder.

Hint

Write a short marker, then cat the file.

Why it matters

Redirection is useful, but it can overwrite files in real shells.

Common mistakes
  • Redirecting into system paths.
  • Using >> when this lab only teaches simple >.
Reference

Commands in this lesson.

echo <text>

Print text or write lab notes with >.

cat <file>

Print text file contents.