Linux Essentials (010-160) — Question 67
Which of the following commands extracts the contents of the compressed archive file1.tar.gz?
Answer options
- A. tar -czf file1.tar.gz
- B. ztar file1.tar.gz
- C. tar -xzf file1.tar.gz
- D. tar --extract file1.tar.gz
- E. detar file1.tar.gz
Correct answer: C
Explanation
The command 'tar -xzf file1.tar.gz' is the correct option as it specifically extracts the contents of a gzipped tar archive. The other options either create a new archive, use the wrong command for extraction, or are not valid commands related to tar and gzipped files.