Skip to content
Clairos Learn

Files and paths · Lesson 34 of 36 · 8 minutes

Symlink chain audit

Create a link, inspect its stored target, and resolve the final path.

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

Auditing symbolic-link targets helps operators explain what they know before they change anything.

ln
Create a symbolic link in the lab with ln -s.

A relative symlink target is interpreted from the link directory.

readlink
Inspect a symbolic-link target; use resolution options deliberately.

A symlink contains a target path, not another copy of the target file.

realpath
Resolve a path to its canonical location in the virtual filesystem.

Resolving a path and reading its contents are separate operations.

Worked example and expected result
$ ln -s /home/learner/README.txt lab/readme-audit-link
(no output; exit 0)

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

$ readlink lab/readme-audit-link
/home/learner/README.txt

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

$ realpath lab/readme-audit-link
/home/learner/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 “Symlink chain audit”, which interpretation is safe?

Apply it elsewhere

Before adapting the readlink workflow from “Symlink chain audit” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Archive manifest workflowTry 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. 01Restore copy verificationCopy a restore candidate and compare it with its source.Practice
  2. 02Archive manifest workflowCreate an archive, list its members, and hash the artifact.Practice
  3. 03Files and paths bridgeCheckpoint file type, canonical path, inventory comparison, and integrity checks.Practice