If the archive was created using relative path names, the input files are built as a directory within the current directory when you retrieve the files. If, however, the archive was created with absolute path names, the same absolute paths are used to recreate the file on your system.
Caution - The use of absolute path names can be dangerous because you might overwrite existing files on your system.
$ cpio -icvd < /dev/rmt/n
Extracts files from standard input.
Specifies that the cpio command should read files in ASCII character format.
Displays the files as they are retrieved in a format that is similar to the output from the ls command.
Creates directories as needed.
Specifies the output file.
$ ls -l
The following example shows how to retrieve all files from the tape in drive 0.
$ cd /var/tmp cpio -icvd < /dev/rmt/0 answers sc.directives tests 8 blocks $ ls -l