Question 1
An instructor reviews this Linux fundamentals exercise: A trainee needs to preserve a directory of project documents in one archive but runs gzip on the directory name directly and receives an error rather than one bundle. Which supported corrective action most directly addresses the problem?
Explanation
Correct Answer
The main issue is: The tar utility combines multiple files and directory entries into an archive, while a compressor such as gzip commonly processes individual streams or files. The appropriate correction is: Create a tar archive from the intended project directory with the appropriate archive-file and source arguments. Verify success by checking: The resulting tar file lists the expected project files and subdirectories without requiring a separate archive per document.
Incorrect Answers
This action addresses bzip2 versus xz decompression format selection, whose causal condition is: Bzip2 and xz use different compression formats; similar purposes do not make their bitstreams interchangeable. The current scenario instead requires attention to: The tar utility combines multiple files and directory entries into an archive, while a compressor such as gzip commonly processes individual streams or files.
This action addresses gzip compressed file versus tar directory archive, whose causal condition is: A .tar.gz file typically contains tar archive data compressed by gzip; decompression and extraction are conceptually distinct operations. In this question the necessary remedy is “Create a tar archive from the intended project directory with the appropriate archive-file and source arguments”, which this alternative does not provide.
This action addresses tar extraction into an approved destination, whose causal condition is: Tar extraction restores archived pathname entries relative to a chosen destination, so the current working directory and archive paths affect where files appear. The observed condition is a trainee needs to preserve a directory of project documents in one archive but runs gzip on the directory name directly and receives an error rather than one bundle; this mechanism addresses another problem.