LPIC-1 Devices, Filesystems and FHS Practice Question
This LPIC-1 practice question tests your understanding of devices, filesystems and fhs. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
$ df -h /var/log
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 20G 18G 1.5G 93% /var/log
$ ls -la /var/log/syslog
-rw-r----- 1 syslog adm 2048000000 Feb 20 10:30 /var/log/syslog
Refer to the exhibit. The system administrator sees that /var/log is 93% full and the syslog file is nearly 2 GB. What is the most appropriate immediate action to free up disk space without losing any critical log data?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Run 'logrotate -f /etc/logrotate.conf' to force log rotation.
Option A is correct because 'logrotate -f' forces an immediate rotation of all log files as defined in /etc/logrotate.conf, which compresses or archives the current syslog file (e.g., syslog becomes syslog.1) and creates a fresh empty log file. This frees disk space without deleting any data, as the rotated logs remain on disk until the configured retention policy removes them. It is the standard, safe immediate action for a nearly full /var/log partition.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✓
Run 'logrotate -f /etc/logrotate.conf' to force log rotation.
Why this is correct
logrotate will compress and rotate the file, freeing space while keeping old logs.
Related concept
Read the scenario before looking for a memorised answer.
✗
Increase the size of the /var/log partition using lvextend.
Why it's wrong here
This requires additional disk space and is not immediate; also it doesn't address the large file.
✗
Delete /var/log/syslog and restart the syslog daemon.
Why it's wrong here
Deleting the file loses log data; also the syslog daemon may hold file handle, causing issues.
✗
Move /var/log/syslog to /tmp and create a symbolic link.
Why it's wrong here
Moving doesn't free space on /var/log; /tmp may also fill up.
Common exam traps
Common exam trap: answer the scenario, not the keyword
LPI often tests the misconception that deleting or moving log files is acceptable, when in fact the correct immediate action is to use logrotate -f to safely rotate logs without data loss.
Detailed technical explanation
How to think about this question
The logrotate utility uses configuration files in /etc/logrotate.d/ and /etc/logrotate.conf to define rotation schedules (daily, weekly, size-based), compression (gzip), and retention counts. The '-f' (force) flag bypasses the normal time/size checks and rotates all logs immediately, which is useful in emergencies. Under the hood, logrotate renames the active log file, signals the daemon (e.g., via SIGHUP to rsyslog or syslog-ng) to close and reopen the log file, and optionally compresses the rotated file, all while preserving the original data in the rotated archive.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the LPIC-1 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Devices, Filesystems and FHS — This question tests Devices, Filesystems and FHS — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Run 'logrotate -f /etc/logrotate.conf' to force log rotation. — Option A is correct because 'logrotate -f' forces an immediate rotation of all log files as defined in /etc/logrotate.conf, which compresses or archives the current syslog file (e.g., syslog becomes syslog.1) and creates a fresh empty log file. This frees disk space without deleting any data, as the rotated logs remain on disk until the configured retention policy removes them. It is the standard, safe immediate action for a nearly full /var/log partition.
What should I do if I get this LPIC-1 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.