Skip to content
Clairos Learn

Files and paths · Lesson 25 of 36 · 8 minutes

Checksum compare

Hash source and restored files to confirm they match.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

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.

sha256sum
Compare content digests to detect byte changes, not to establish who authored the file.

A checksum detects changes only relative to a trusted expected digest.

Worked example and expected result
$ cp README.txt restore/README.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

$ sha256sum README.txt
a76968d5df26cfd59ecd7d080f8283d65e91ec7366d233b4b98233877aa154c6  /home/learner/README.txt

Exit status: 0. The command completed successfully in the training fixture.

$ sha256sum restore/README.txt
a76968d5df26cfd59ecd7d080f8283d65e91ec7366d233b4b98233877aa154c6  /home/learner/restore/README.txt

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Checksum compare”, which interpretation is safe?

Apply it elsewhere

Before adapting the sha256sum workflow from “Checksum compare” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Symlink inventoryTry an incident drill

Anonymous 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.

Keep learning

  1. 01Archive verificationList archive contents and compare checksums before trusting a backup.Practice
  2. 02Symlink inventoryCreate, read, and inspect links before relying on them.Practice
  3. 03Glob safety previewList and find targets before deleting broad patterns.Practice