Mission 51

Config text compare

Use grep and diff to compare two config snapshots.

Text and logs
8 minutes Core Lesson 51 of 360
diffgrep
Lesson 51 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 config files

Run diff data/config-a.conf data/config-b.conf.

diff data/config-a.conf data/config-b.conf
Search listen

Run grep listen data/config-b.conf.

grep listen data/config-b.conf
Search server name

Run grep server_name data/config-a.conf.

grep server_name data/config-a.conf
Lesson support

What to notice while you play.

Objective

Spot meaningful differences in config text.

Hint

Use diff first, then grep for listen and server_name.

Why it matters

Config review is safer when changes are explicit.

Common mistakes
  • Only reading one file.
  • Missing a changed listen port.
Reference

Commands in this lesson.

grep [-i] <text> <file>

Find literal text inside a file.

diff <left> <right>

Compare two lab text files.