Archive Tab – Create the archive from Ann’s home directory
Correct Command:
tar -cvf /tmp/ann.tar -C /home/ ann
Extract Tab – Extract the archive into Joe’s home directory
Correct Command:
tar -xvf /tmp/ann.tar -C /home/ joe
This performance-based question tests file archiving and restoration using tar, a core System Management skill in the CompTIA Linux+ V8 objectives. The task requires preserving Ann’s files and placing them correctly into Joe’s home directory.
???? Archive Phase Explanation
The goal of the first step is to archive Ann’s entire home directory without embedding the full path (/home/ann) inside the archive. This is accomplished using the -C option.
Command breakdown:
tar → archive utility
-c → create an archive
-v → verbose output (optional but allowed)
-f /tmp/ann.tar → specifies the archive file
-C /home/ → changes directory before archiving
ann → archives the ann directory only
This results in a clean archive containing Ann’s files without absolute paths, which is best practice and explicitly covered in Linux+ V8 documentation.
???? Extract Phase Explanation
The second step extracts the archived files into Joe’s home directory.
Command breakdown:
-x → extract
-v → verbose
-f /tmp/ann.tar → specifies the archive
-C /home/joe → extracts files directly into Joe’s home directory
This ensures Joe receives Ann’s files correctly under /home/joe/ann or directly under /home/joe depending on post-extraction handling, which matches Linux+ expectations for administrative user transitions.