System Administration Guide

How to List the Files on a Tape (tar)

  1. Insert a tape into the tape drive.

  2. Display the tape contents with the tar command.


    $ tar tvf /dev/rmt/n
    

    t

    Lists the table of contents for the files on the tape. 

    v

    Used with the t option, and provides detailed information about the files on the tape.

    f /dev/rmt/n

    Indicates the tape device. 

Example--Listing the Files on a Tape (tar)

In this example, the table of contents for the tape in drive 0 contains three files.


$ tar tvf /dev/rmt/0
drwxr-xr-x 101/10       0 Nov  6 16:31 1996 reports/
-rw-r--r-- 101/10       0 Nov  6 16:31 1996 reports/reportA
-rw-r--r-- 101/10       0 Nov  6 16:31 1996 reports/reportB
-rw-r--r-- 101/10       0 Nov  6 16:31 1996 reports/reportC