System Administration Guide: Devices and File Systems

ProcedureHow to List the Files on a Tape (cpio)


Note –

Listing the table of contents on a tape takes a long time because the cpio command must process the entire archive.


  1. Insert an archive tape into the tape drive.

  2. List the files on the tape.


    $ cpio -civt < /dev/rmt/n
    

Example 29–9 Listing the Files on a Tape (cpio)

The following example shows how to list the files on the tape in drive 0.


$ cpio -civt < /dev/rmt/0
-rw-r--r--    1 root     other          0 Jul 28 14:59 2004, filea
-rw-r--r--    1 root     other          0 Jul 28 14:59 2004, fileb
-rw-r--r--    1 root     other          0 Jul 28 14:59 2004, filec
drwxr-xr-x    2 root     other          0 Jul 28 14:59 2004, letters
drwxr-xr-x    2 root     other          0 Jul 28 15:00 2004, reports
16 blocks
$