System Administration Guide, Volume 1

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


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


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

    f /dev/rmt/n

    Indicates the tape device. 

    filename ...

    Indicates the files and directories you want to retrieve. 

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

The following example lists the files on the tape in drive 0.

$ tar tvf /dev/rmt/0
drwx--x--x   0/1        0 Jul 14 09:24 1999 reports/
-rw------t   0/1    30000 Jul 14 09:23 1999 reports/reportA
-rw------t   0/1    31000 Jul 14 09:24 1999 reports/reportB
-rw------t   0/1    32000 Jul 14 09:24 1999 reports/reportC