nerdexam
IBM

000-221 · Question #194

What is the purpose of using relative path names when creating a tar file?

The correct answer is D. To enable restored files to be extracted to any user-specified location. Relative paths in a tar archive omit the leading slash, so files are extracted relative to the current working directory, giving the operator full control over the restore destination.

System Management

Question

What is the purpose of using relative path names when creating a tar file?

Options

  • ATo allow the tar file to be used on Linux systems
  • BTo ensure files are always extracted to a specific path
  • CTo restore to a raw device name on the destination system
  • DTo enable restored files to be extracted to any user-specified location

How the community answered

(46 responses)
  • A
    9% (4)
  • B
    13% (6)
  • C
    2% (1)
  • D
    76% (35)

Why each option

Relative paths in a tar archive omit the leading slash, so files are extracted relative to the current working directory, giving the operator full control over the restore destination.

ATo allow the tar file to be used on Linux systems

Both AIX and Linux tar implementations support relative and absolute path names equally, so relative paths confer no special cross-platform compatibility advantage.

BTo ensure files are always extracted to a specific path

Relative paths produce the opposite behavior - they allow flexible destination selection rather than locking extraction to a specific directory, which is what absolute paths would enforce.

CTo restore to a raw device name on the destination system

Restoring to a raw device involves specifying a block device as the output target during extraction and is entirely unrelated to whether the archive was created with relative or absolute path names.

DTo enable restored files to be extracted to any user-specified locationCorrect

When a tar archive is created using relative path names, no absolute root is embedded in the archive metadata. At restore time, the extraction occurs relative to whatever directory the user is in when the tar command is run, allowing files to be placed in any location on any system simply by changing to the desired directory before extracting.

Concept tested: tar relative path flexibility for restore destination

Source: https://www.ibm.com/docs/en/aix/7.3?topic=t-tar-command

Topics

#tar#relative paths#backup#file extraction

Community Discussion

No community discussion yet for this question.

Full 000-221 Practice