The following command has just been run successfully:
What will happen if the command sequence is run again?
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.
题解
「tar」指令可以用来封装(压缩)文件,或是解除封装(压缩)。「-x」、「--extract」或是「--get」参数可以取出封装中的文件。「-v」或是「--verbose」参数可以列出目前处理的文件。「-f」或是「--file」参数可以指定要输入或是输出的封装(压缩)文件。
题目给的指令,会先将工作目录移动到「/opt」。接着再使用「tar」指令来解开「/dev/nst0」这个设备目前的读取位置所保存的封装数据。且根据名称可以判断,「/dev/nst0」为第一个不可倒回的 SCSI 磁带设备。
选项 A,错误。
选项 B,错误。
选项 C,错误。
选项 D,由于题目设置指令已经成功运行过一次,且「/dev/nst0」是「不可倒回」的 SCSI 磁带设备,因此第二次再运行指令的时候,会继续去解开磁带中的下一个封装数据,所以「/opt」目录又会出现额外的文件。此为正确答案。
