Restore drill
Restore into a review folder before touching live paths.
Understand the pattern
Junior operators build confidence by gathering evidence before changing systems.
cp- Copy a file to a new location, leaving the original in place.
Confirm the destination before replacing a file. This lab supports file copies, not every cp option.
diff- Compare two text files; a difference is a meaningful nonzero status, not necessarily an execution error.
Status 1 means differences for diff; shell status must be interpreted in command context.
stat- Inspect a file or directory metadata record, including ownership, permissions, and size.
Metadata and file contents answer different questions.
Worked example and expected result
$ cp /srv/www/index.html restore/index-copy.html(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
$ diff /srv/www/index.html restore/index-copy.html(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
$ stat restore/index-copy.htmlPath: /home/learner/restore/index-copy.html Type: file Mode: -rw-r--r-- Owner: learner Group: learners Size: 72 bytes
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Archive verificationTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.