Novell Certified Linux Professional (CLP) — Question 13
What does the following command do?
tar -tzvf /tmp/backup.tgz etc/HOSTNAME
Answer options
- A. it includes the etc/HOSTNAME file in the /tmp/backup.tgz archive.
- B. it extracts the etc/HOSTNAME file from the /tmp/backup.tgz archive.
- C. it displays a line similar to the following, but otherwise does nothing: -rw-r--r--- riit/root 23 2005-03-11 14:20 etc/HOSTNAME
- D. it produces an error message because the options are in the wrong sequence.
Correct answer: D
Explanation
The command is incorrectly structured as the options are not in the proper order, leading to an error. Option A is incorrect because it suggests adding a file, while B incorrectly states that it extracts a file. Option C is also wrong as it implies the command would execute without errors, which it does not.