CompTIA Linux+ (XK0-004) — Question 4

A systems administrator must clean up all application files in the directory /var/log/app. However, the company's security policy requires the files to be kept on the backup server for one year. The Linux server has only the tar and bzip2 packages installed.
Which of the following commands will package and compress the files?

Answer options

Correct answer: B

Explanation

The correct answer is B because the '-j' option with tar is used to compress files using bzip2, which is the required command for the specified task. Option A incorrectly uses '-z' for gzip, which is not available, while C does not include any compression, and D is meant for extracting files, not compressing them.