Red Hat Certified Systems Admin (RHCSA) EX200 Practice Exam

Access More Questions
Which command lists the contents of a tar archive?
Correct Answer:
tar -tf
Explanation:
To see what’s inside a tar archive, use the list option with the file flag: tar -tf archive.tar. The -t option tells tar to list the archive’s contents, and -f specifies which archive to read. If the archive is compressed, you can add -z (for gzip) and even -v for a verbose listing, e.g., tar -tzvf archive.tar.gz or tar -tvf archive.tar. The other options shown are for extracting or modifying the archive, not listing it.

Access more questions from this quiz

Continue to Red Hat Certified Systems Admin (RHCSA) EX200 Practice Exam for more practice questions and the full quiz experience.

Access More Questions