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 28–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
-r--r--r--    1 kryten   staff      206663 Jul 14 13:52 2010, filea
-r--r--r--    1 kryten   staff      206663 Jul 14 13:52 2010, fileb
-r--r--r--    1 kryten   staff      206663 Jul 14 13:52 2010, filec
drwxr-xr-x    2 kryten   staff           0 Jul 14 13:52 2010, letters
drwxr-xr-x    2 kryten   staff           0 Jul 14 13:52 2010, reports
1280 blocks