Change to the directory where you want to put the files.
Insert the tape into the tape drive.
Retrieve a subset of files from the tape.
$ cpio -icv "*file" < /dev/rmt/n |
-i |
Extracts files from standard input. |
-c |
Specifies that the cpio command should read headers in ASCII character format. |
-v |
Displays the files as they are retrieved in a format that is similar to the output from the ls command. |
"*file" |
Specifies that all files that match the pattern are copied to the current directory. You can specify multiple patterns, but each pattern must be enclosed in double quotation marks. |
< /dev/rmt/n |
Specifies the input file. |
For more information, see the cpio(1) man page.
Verify that the files were copied.
$ ls -l |
The following example shows how to retrieve all files with the chapter suffix from the tape in drive 0.
$ cd /home/smith/Book $ cpio -icv "*chapter" < /dev/rmt/0 Boot.chapter Directory.chapter Install.chapter Intro.chapter 31 blocks $ ls -l |