LPIC-2 Exam 201 (Linux Engineer) — Question 9
The following command has just been run successfully:
Cd /opt; tar xvf /dev/nst0;
What will happen if the command sequence is run again?
Answer options
- A. An error saying that there is no tape present is generated because the tape has been ejected after being used
- B. The contents of /opt will be restored again
- C. The entire contents of /opt will be replaced with the contents of the next file on the tape
- D. The contents of /opt will have additional content added from the next file on the tape
Correct answer: D
Explanation
The correct answer is D because the 'tar xvf' command appends files to the target directory without deleting existing files. Options A and B are incorrect because the tape is not ejected automatically after use, and the contents of /opt would not be restored as the command would add to the existing files. Option C is also incorrect, as 'tar' does not replace existing files unless specifically instructed to do so.