000-221 · Question #177
An administrator needs to download and install a later version of the IBM Systems Director Common Agent. Which command would extract the contents of the installation package…
The correct answer is C. gunzip -cd SysDir6_3_2_Common_Agent_AIX.tar.gz | tar-xvf-. Extracting a .tar.gz file on AIX requires piping gunzip output to tar, as the gzip compression layer must be removed before tar can read the archive.
Question
An administrator needs to download and install a later version of the IBM Systems Director Common Agent. Which command would extract the contents of the installation package (SysDir6_3_2_Common_Agent_AIX.tar.gz) to a local directory?
Options
- Aunzip -l SysDir6_3_2_Common_Agent_AIX.tar.gz
- Bgeninstail -ue SysDir6_3_2_Common_Agent_AIX.tar.gz -d.
- Cgunzip -cd SysDir6_3_2_Common_Agent_AIX.tar.gz | tar-xvf-
- Duncompress SysDir6_3_2_Common_Agent_AIX.tar.gz | installp -et -
How the community answered
(60 responses)- A2% (1)
- B5% (3)
- C83% (50)
- D10% (6)
Why each option
Extracting a .tar.gz file on AIX requires piping gunzip output to tar, as the gzip compression layer must be removed before tar can read the archive.
unzip operates on .zip format archives rather than .tar.gz files, and the -l flag only lists archive contents rather than extracting them.
geninstall is an AIX command for installing packaged software products and has no capability to decompress or extract a .tar.gz archive.
The command gunzip -cd decompresses the .gz file and writes the result to stdout (-c flag), which is then piped to tar -xvf - where the trailing dash instructs tar to read from stdin and extract the archive verbosely. This two-stage pipeline correctly handles both gzip decompression and tar extraction in a single command on AIX systems.
uncompress handles files compressed with the older compress utility (.Z extension), not gzip (.gz), so it would fail on this file, and installp is an AIX package installer unrelated to tar archive extraction.
Concept tested: Extracting gzip-compressed tar archives on AIX
Source: https://www.ibm.com/docs/en/aix/7.2?topic=g-gunzip-command
Topics
Community Discussion
No community discussion yet for this question.