Skip to content
Clairos Learn

Files and paths · Lesson 11 of 36 · 7 minutes

Wildcard safety

See why broad delete patterns are blocked in the lab.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

A wrong wildcard can destroy real files quickly.

find
Search directory trees by criteria rather than relying on one shallow listing.

Quote wildcard patterns so find receives them instead of the shell expanding them first.

rm
Remove the named file from the virtual workspace. The training root and system trees are guarded.

Simulator protections are not a promise that a real shell will protect the same target.

ls
List directory entries; -a includes hidden names and -l adds ownership and permission detail.

A listing is not proof that you can read or modify every listed file.

Worked example and expected result
$ find /home/learner -name note
/home/learner/archive/old-note.txt
/home/learner/notes

Exit status: 0. The command completed successfully in the training fixture.

$ rm "*"
Wildcard deletion is not simulated. Name one lab file directly.

Exit status: 1. This nonzero result is an expected part of this exercise.

$ ls /home/learner
archive  backups  data  lab  notes  projects  README.txt  restore  scripts

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Wildcard safety”, which interpretation is safe?

Apply it elsewhere

Before adapting the rm workflow from “Wildcard safety” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Path normalizationTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Rename workflowCreate a report draft and rename it safely.Practice
  2. 02Path normalizationUse dot and dot-dot safely without leaving the simulated filesystem.Practice
  3. 03Script metadataInspect and update simulated script permissions.Practice