Courseiva
Operation of Running SystemseasyMultiple ChoiceObjective-mapped

LFCS Operation of Running Systems Practice Question

A system administrator wants to view the last 10 lines of the system log file '/var/log/syslog' and continue to watch for new lines as they are appended. Which command should be used?

⚠ Common exam trap

Many exam-takers confuse `tail -n 10` (static view) with `tail -f` (follow mode), or mistakenly think `less` with its Shift+F feature is the default answer, but the question explicitly requires a single command that both shows the last 10 lines and continuously watches for new lines.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

tail -n 10 -f /var/log/syslog

The `tail -n 10 -f /var/log/syslog` command first displays the last 10 lines of the file and then uses the `-f` (follow) flag to continuously monitor the file for new appended lines, outputting them in real time. This matches the requirement to both view the last 10 lines and watch for new entries.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • tail -n 10 /var/log/syslog

    Why it's wrong here

    Displays only the last 10 lines once, does not follow.

  • less /var/log/syslog

    Why it's wrong here

    Opens file in pager, but does not automatically follow; pressing 'F' would follow.

  • tail -n 10 -f /var/log/syslog

    Why this is correct

    Shows last 10 lines and follows new entries.

  • head -n 10 /var/log/syslog

    Why it's wrong here

    Displays the first 10 lines, not what is needed.

About these practice questions

Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.