LPIC-1 Administrative Tasks Practice Question
Which command is used to view the last few lines of a log file and simultaneously follow new entries as they are written?
⚠ Common exam trap
Many exam-takers confuse `tail -f` with `less` (which can also follow with `Shift+F`), but the question explicitly asks for the command that 'simultaneously follow new entries as they are written' in its default invocation, making `tail -f` the only correct answer without requiring additional key presses.
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 -f
The `tail -f` command is correct because it displays the last 10 lines of a file by default and then continues to monitor the file for new lines, outputting them as they are appended. This is essential for real-time log monitoring, as it uses inotify or polling to detect file changes without requiring manual re-reading.
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 -f
Why this is correct
tail -f keeps the file descriptor open and prints appended lines as they are written, after showing the final lines by default. Other tools such as cat or less do not continuously follow growth, so tail -f satisfies both the initial view and live monitoring requirement.
- ✗
cat
Why it's wrong here
cat writes the entire file to standard output once and terminates, providing no follow mode for new entries. It is tempting because it displays file contents quickly, but would be correct for concatenating or printing complete small files.
- ✗
head -n 10
Why it's wrong here
head prints the first lines of a file and exits, so it neither shows the tail nor follows appended entries. It is tempting because it displays a small line count, but would be correct for inspecting the beginning of a file, such as a header.
- ✗
less
Why it's wrong here
less opens the file for interactive paging and does not automatically display newly appended lines as they arrive. It is tempting because it reads files and supports searching, but would be correct for browsing and navigating existing file content rather than live monitoring.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.