Mission 303

Quoted paths with spaces

Use quotes so a path containing spaces remains one argument.

Terminal basics
8 minutes Core Lesson 303 of 360
mkdirtouchls
Lesson 303 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 a quoted directory

Run mkdir "lab/quoted space".

mkdir "lab/quoted space"
Create a file in the quoted path

Run touch "lab/quoted space/note.txt".

touch "lab/quoted space/note.txt"
List the quoted path

Run ls "lab/quoted space".

ls "lab/quoted space"
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with quoting paths that contain spaces.

Hint

Start with mkdir "lab/quoted space", inspect the result, then continue in order.

Why it matters

Quoting paths that contain spaces helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves quoting paths that contain spaces.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

ls [-la] [path]

List lab files and folders.

mkdir <name>

Create a folder.

touch <file>

Create an empty file.

lsof

Show simulated files and sockets opened by services.