How do you uncompress and untar an archive called "lot_of_thing.tar.Z"?
-
tar lot_of_thing.tar.Z | decomp
-
zcat lot_of_thing.tar.Z | tar xvf -
-
tar xvf lot_of_thing.tar.Z
-
tar lot_of_thing
The command 'zcat lot_of_thing.tar.Z | tar xvf -' correctly uncompresses the .Z file using zcat and pipes the output to tar for extraction. The hyphen (-) tells tar to read from stdin. Option A pipes in wrong direction, C doesn't handle compression, and D is incomplete.
To uncompress and untar an archive called "lot_of_thing.tar.Z", you can use the following options:
A) tar lot_of_thing.tar.Z | decomp - This option is incorrect because the command decomp is not a valid command for decompressing and untarring an archive. It should be replaced with a valid decompression command, such as zcat or uncompress.
B) zcat lot_of_thing.tar.Z | tar xvf - - This option is correct. The zcat command is used to decompress the archive, and the tar xvf - command is used to untar it. The - at the end represents the input from the previous command.
C) tar xvf lot_of_thing.tar.Z - This option is incorrect because it only performs the untar operation, without decompressing the archive. The .Z extension indicates that the archive is compressed, and it needs to be decompressed before untarring.
D) tar lot_of_thing - This option is incorrect because it only specifies the name of the archive, without any decompression or untarring commands. It won't perform the desired operation.
Therefore, the correct answer is B) zcat lot_of_thing.tar.Z | tar xvf -. This option decompresses and untars the "lot_of_thing.tar.Z" archive.