Mission 313

Temporary workspaces

Create bounded temporary files and directories for disposable work.

Files and paths
8 minutes Core Lesson 313 of 360
mktempls
Lesson 313 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 temporary file

Run mktemp lab/note.XXXXXX.

mktemp lab/note.XXXXXX
Create a temporary directory

Run mktemp -d lab/work.XXXXXX.

mktemp -d lab/work.XXXXXX
Inspect the temporary paths

Run ls -la lab.

ls -la lab
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with using temporary paths instead of cluttering durable locations.

Hint

Start with mktemp lab/note.XXXXXX, inspect the result, then continue in order.

Why it matters

Using temporary paths instead of cluttering durable locations helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves using temporary paths instead of cluttering durable locations.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

ls [-la] [path]

List lab files and folders.

mktemp [-d] [template]

Create a bounded temporary file or directory inside the training lab.

lsof

Show simulated files and sockets opened by services.