System Administration Guide, Volume I

How to Extract Files From a Remote Tape Drive

  1. Change to a temporary directory.


    $ cd /var/tmp
    
  2. To extract files to a remote tape drive use the tar and dd commands.


    $ rsh remotehost dd if=/dev/rmt/n | tar xvBpf -
    

    rsh remotehost

    Is a remote shell that is started to extract the files from the tape device using the dd command.

    dd if=/dev/rmt/n

    Indicates the input device. 

    | tar xvBpf -

    Pipes the output of the dd command to the tar command used to restored the files.

  3. Verify that the files have been extracted.


    $ ls -l /var/tmp
    

Example--Extracting Files From a Remote Tape Drive


$ rsh mercury dd if=/dev/rmt/0 | tar xvBpf -
x answers/, 0 bytes, 0 tape blocks
x answers/test129, 48 bytes, 1 tape blocks
20+0 records in
20+0 records out
x sc.directives/, 0 bytes, 0 tape blocks
x sc.directives/sc.190089, 77 bytes, 1 tape blocks
x tests/, 0 bytes, 0 tape blocks
x tests/test131, 84 bytes, 1 tape blocks
$ ls -l /var/tmp