Courseiva
System ManagementhardMultiple SelectObjective-mapped

XK0-006 System Management Practice Question

A system administrator needs to locate all regular files in /var/log that have been modified within the last 7 days and have a size greater than 10 MB. The administrator then needs to compress these files using gzip. Which THREE commands or options should be used together to accomplish this? (Choose THREE.)

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

find

find locates files based on criteria like -type f for regular files, -mtime for modification time, -size for size. The -exec option runs a command on each file found. gzip compresses files.

Answer analysis

Option-by-option breakdown

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

  • find

    Why this is correct

    find is the primary command used to locate files based on the specified criteria.

  • locate

    Why it's wrong here

    locate searches a database of file names and does not have options for modification time or size filtering.

  • gzip

    Why this is correct

    gzip compresses files; it is used within the find -exec command.

  • find /var/log -type f -mtime -7 -size +10M -exec gzip {} \;

    Why this is correct

    This is the correct command structure to find files matching the criteria and compress them.

  • xargs

    Why it's wrong here

    While xargs can be used with find, it is not strictly necessary; -exec directly handles the command.

About these practice questions

One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 XK0-006 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 XK0-006 exam.