ch02 · beginner · 90-120 min
files, text, and safe changes
Create, copy, move, remove, read, and search files with preview-first discipline.
You can change files in a disposable workspace and explain the safety check before each change.
shows: The repeated locate -> preview -> act -> verify loop behind every file change, plus the fact that the shell expands globs before the command ever runs and that bounded readers precede searching.
does not prove: The loop is a discipline, not a guarantee: a clean preview proves the target you saw, not that another process won't change the directory between preview and act, nor that flags like -a copied the right metadata.
Lessons in this chapter
-
ch02/l01
Create and copy without losing metadata
mkdir -pBuild test spaces, copy intentionally, and preserve metadata when it matters. -
ch02/l02
Move and remove after preview
rm -iTreat deletion as a workflow, not a single command. -
ch02/l03
Read and search text under pressure
grep -rnUse the right read/search tool for file size, context, and evidence.
safe file-change exercise
Create a disposable app directory, back up config, move one file, remove only previewed targets, and find one error in copied logs.
DeliverableA transcript with every preview and verification command.
Success criteria
- No command targets a production path.
- Every destructive step is preceded by a proof step.
- Search output includes file and line evidence.
Files & Directories
After your lab transcript shows preview-before-change discipline.