Mission 324

Rotated access comparison

Compare active and rotated access logs before summarizing traffic.

Text and logs
8 minutes Admin Lesson 324 of 360
difftailnl
Lesson 324 of 360 0/360 lessons 0/17 missions Text and logs · 8 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 8 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Compare active and rotated logs

Run diff /var/log/nginx-access.log /var/log/nginx-access.log.1.

diff /var/log/nginx-access.log /var/log/nginx-access.log.1
Read recent rotated entries

Run tail -n 2 /var/log/nginx-access.log.1.

tail -n 2 /var/log/nginx-access.log.1
Number the active log

Run nl /var/log/nginx-access.log.

nl /var/log/nginx-access.log
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with comparing current and rotated log evidence.

Hint

Start with diff /var/log/nginx-access.log /var/log/nginx-access.log.1, inspect the result, then continue in order.

Why it matters

Comparing current and rotated log evidence helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves comparing current and rotated log evidence.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

diff <left> <right>

Compare two lab text files.

nl [file]

Number lines from a file or supported text pipeline.