Mission 07

Safe deletion

Remove a single lab file and learn why wildcards, root, and force deletes are blocked.

Files and paths
8 minutes Beginner Lesson 7 of 360
touchrmls
Lesson 7 of 360 0/360 lessons 0/17 missions Files and paths · 8 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 8 minutes

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

Create a delete target

Run mkdir lab, then touch lab/delete-me.txt.

mkdir labtouch lab/delete-me.txt
Remove one file

Run rm lab/delete-me.txt.

rm lab/delete-me.txt
See the guardrail

Run rm -rf / and notice it is refused.

rm -rf /
Lesson support

What to notice while you play.

Objective

Practice naming one safe target instead of broad delete patterns.

Hint

Create lab/delete-me.txt first, then remove that exact path.

Why it matters

Real rm mistakes can be destructive; the lab teaches narrow targets.

Common mistakes
  • Using rm -rf before verifying the path.
  • Using wildcards when one filename is safer.
Reference

Commands in this lesson.

ls [-la] [path]

List lab files and folders.

touch <file>

Create an empty file.

rm <file>

Remove one lab file with safeguards.

lsof

Show simulated files and sockets opened by services.