Courseiva
Question 3 of 144
server-administrationeasyMultiple ChoiceObjective-mapped

SK0-005 server-administration Practice Question

A server administrator receives an alert that a critical server's disk is almost full. Upon investigation, the administrator finds a large log file that has grown significantly. The log file is rotated daily, but today's rotation failed. Which command should the administrator use FIRST to free up space immediately?

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

> /var/log/large.log to truncate the file.

Option A is correct because truncating the file to zero size instantly reclaims disk space without removing the file, which could cause issues if processes still have it open. Option B is wrong because deleting the file will not free space if any process holds an open file handle. Option C is wrong because moving the file has similar issues as deletion. Option D is wrong because running logrotate might fail if the disk is full or if the rotation script is broken; truncation is quicker and safer under pressure.

Answer analysis

Option-by-option breakdown

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

  • logrotate -f /etc/logrotate.conf to force log rotation.

    Why it's wrong here

    Forcing log rotation may not succeed if the disk is already full or the rotation mechanism is broken; truncation provides an immediate, reliable fix.

  • > /var/log/large.log to truncate the file.

    Why this is correct

    Redirection with > nullifies the file content immediately, freeing disk space while keeping the inode intact so processes can continue writing.

  • rm -rf /var/log/large.log to delete the file.

    Why it's wrong here

    Deleting the file does not release disk space if any application still has the file open; space is only reclaimed when all file handles are closed.

  • mv /var/log/large.log /backup/ to move the file.

    Why it's wrong here

    Moving the file to another location creates the same problem as deletion: the original process may still write to the old inode, so space is not freed immediately.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 26, 2026

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.

Loading comments…

Sign in to join the discussion.

This SK0-005 practice question is part of Courseiva's free CompTIA 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 SK0-005 exam.