Skip to content
Clairos Learn

Text and logs · Lesson 30 of 38 · 8 minutes

Retention evidence review

Compare active and rotated logs before retention decisions.

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.

du
Estimate usage attributed to files or directories; compare it with filesystem capacity when investigating storage.

du describes file usage, whereas df describes filesystem capacity.

find
Search directory trees by criteria rather than relying on one shallow listing.

Quote wildcard patterns so find receives them instead of the shell expanding them first.

wc
Count input. -l counts newline characters, -w counts whitespace-delimited words, and -c counts bytes.

Text without a final newline may have fewer counted lines than visible rows.

Worked example and expected result
$ du -sh /var/log
3K	/var/log

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

$ find /var/log -name log
/var/log
/var/log/auth.log
/var/log/cron.log
/var/log/dpkg.log
/var/log/journal/backup.log
/var/log/journal/nginx.log
/var/log/journal/ssh.log
/var/log/kern.log
/var/log/nginx-access.log
/var/log/nginx-access.log.1
/var/log/nginx-error.log
/var/log/nginx-error.log.1
/var/log/syslog

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

$ wc -l /var/log/nginx-error.log.1
1 /var/log/nginx-error.log.1

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 “Retention evidence review”, which interpretation is safe?

Apply it elsewhere

Before adapting the find workflow from “Retention evidence review” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Numbered log readingTry 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. 01Access log triageSearch access logs for status and route signals.Practice
  2. 02Numbered log readingAdd stable line numbers to a short authentication-log view.Practice
  3. 03Sorted account diffUse comm to separate shared and unique account names.Practice