Mission 304

Escaped spaces

Use a backslash to keep an escaped space inside one path argument.

Terminal basics
8 minutes Core Lesson 304 of 360
touchfilerealpath
Lesson 304 of 360 0/360 lessons 0/17 missions Terminal basics · 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 an escaped-space file

Run touch lab/escaped\ note.txt.

touch lab/escaped\ note.txt
Identify the escaped file

Run file "lab/escaped note.txt".

file "lab/escaped note.txt"
Resolve the escaped file

Run realpath "lab/escaped note.txt".

realpath "lab/escaped note.txt"
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with escaping a space in a path.

Hint

Start with touch lab/escaped\ note.txt, inspect the result, then continue in order.

Why it matters

Escaping a space in a path helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves escaping a space in a path.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

touch <file>

Create an empty file.

file <path>

Identify a simulated file, directory, link, or text format.

realpath <path>

Resolve a path to its canonical simulated location.