Question 140
Before a RHEL 10 maintenance task, the administrator needs to create gzip archive for archive /tmp/audit09.tar.gz using working directory /srv/data09. Which tar invocation matches?
Explanation
Correct Answer
The c flag creates an archive and z applies gzip compression, while f names the archive file. That performs the requested operation. This matches the stated requirement to create gzip archive for archive /tmp/audit09. By contrast, the plausible alternative `tar -tzf /tmp/audit09.tar.gz` has the effect: The t flag lists archive contents without extracting or modifying them. This is a different archive operation from the requested create gzip archive; that operation would not achieve the requested result.
Incorrect Answers
The x flag extracts members, z enables gzip handling, and -C selects the target directory. This is a different archive operation from the requested create gzip archive. The stated task is to create gzip archive for archive /tmp/audit09. Instead, `tar -czf /tmp/audit09.tar.gz -C /srv/data09 .` is the relevant alternative because the c flag creates an archive and z applies gzip compression, while f names the archive file. That performs the requested operation.
The t flag lists archive contents without extracting or modifying them. This is a different archive operation from the requested create gzip archive. The stated task is to create gzip archive for archive /tmp/audit09. Instead, `tar -czf /tmp/audit09.tar.gz -C /srv/data09 .` is the relevant alternative because the c flag creates an archive and z applies gzip compression, while f names the archive file. That performs the requested operation.
Using c without z creates a tar archive but does not produce gzip-compressed output. This is a different archive operation from the requested create gzip archive. The stated task is to create gzip archive for archive /tmp/audit09. Instead, `tar -czf /tmp/audit09.tar.gz -C /srv/data09 .` is the relevant alternative because the c flag creates an archive and z applies gzip compression, while f names the archive file. That performs the requested operation.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests