Create directories and files, copy and move them deliberately, and use evidence-first checks before irreversible removal.
What you will be able to do
- Explain the five core decisions involved in create copy move and delete files.
- Choose the narrow Linux command or method that matches a stated operational need.
- Interpret command output as evidence before deciding whether to change system state.
- Apply an observe, act, verify, and recover workflow to a realistic Linux task.
01
Build the Operating Model
Create directories and files, copy and move them deliberately, and use evidence-first checks before irreversible removal.
Reliable Linux work separates observation, decision, action, and verification. That order keeps a command from becoming a guess and makes each result useful for the next decision.
Begin in a disposable lab or a recoverable environment. Record the active user, working directory, target, and baseline output before any command that can change system state.
02
Create directories
The `mkdir` command creates one or more directories at the paths supplied as operands. This distinction helps identify the smallest relevant part of the system before a change is attempted.
Confirm the parent location, create the directory, and list the parent to verify its exact name. Keep the command, target, and visible result together so another person can reproduce the reasoning.
The safety boundary is clear: check spelling before creating nested paths. You should be able to verify this result: a new directory at the intended path.
03
Create empty files
The `touch` command can create a missing empty file or update timestamps on an existing file. This distinction helps identify the smallest relevant part of the system before a change is attempted.
List the target first, use `touch` only with the intended path, and inspect the result afterward. Keep the command, target, and visible result together so another person can reproduce the reasoning.
The safety boundary is clear: existing file contents are not cleared. You should be able to verify this result: a file exists or its timestamps change.
04
Copy data
The `cp` command copies file data to a new destination while leaving the source in place. This distinction helps identify the smallest relevant part of the system before a change is attempted.
Check whether the destination exists, copy to the explicit path, and compare both names afterward. Keep the command, target, and visible result together so another person can reproduce the reasoning.
The safety boundary is clear: an existing destination may be replaced. You should be able to verify this result: source preserved and destination created.
05
Move or rename
The `mv` command relocates a filesystem entry or changes its name at the destination. This distinction helps identify the smallest relevant part of the system before a change is attempted.
Inspect both source and destination, move once, and list the destination directory to confirm completion. Keep the command, target, and visible result together so another person can reproduce the reasoning.
The safety boundary is clear: a move can replace an existing destination. You should be able to verify this result: the entry appears at its new path.
06
Remove safely
The `rm` command removes named files and normally provides no desktop-style recovery path. This distinction helps identify the smallest relevant part of the system before a change is attempted.
Print the working directory, list the exact targets, and remove the smallest explicit set of paths. Keep the command, target, and visible result together so another person can reproduce the reasoning.
The safety boundary is clear: removal has no reliable built-in undo path. You should be able to verify this result: only the verified targets are removed.
07
Apply One Controlled Change
Start from the read-only commands that reveal identity, scope, and current state. Write the expected result before entering a modifying command, including which files, processes, accounts, or connections may be affected.
Make one narrow change and stop. If the output reports an error or an unexpected target, preserve that evidence and return to inspection instead of adding unrelated commands.
Repeat the original observation after the action. A successful command status is useful, but the real completion signal is the intended state plus the absence of an unintended side effect.
08
Complete the Evidence Loop
A good terminal record answers four questions: what was observed, why one action was selected, exactly what changed, and how the result was verified. A screenshot without command context answers fewer questions than saved text output.
Test both the expected success and one safe failure condition. This confirms that the procedure recognizes a wrong path, missing permission, invalid input, stopped service, or unavailable endpoint instead of silently continuing.
Finish by restoring the lab baseline when the task was experimental. For an operational change, record the final state and the reversal step so later work begins from a known boundary.
09
Recap Before Practice and Prove
The first decision concerns create directories. Confirm the parent location, create the directory, and list the parent to verify its exact name.
The second decision concerns create empty files. List the target first, use `touch` only with the intended path, and inspect the result afterward.
The third decision concerns copy data. Check whether the destination exists, copy to the explicit path, and compare both names afterward.
The fourth decision concerns move or rename. Inspect both source and destination, move once, and list the destination directory to confirm completion.
The final decision concerns remove safely. Print the working directory, list the exact targets, and remove the smallest explicit set of paths. Keep the final output as the baseline for the next task.