System Administration Guide, Volume I

Example--Copying All Files in a Directory to a Tape (cpio)

The following example copies all of the files in the directory /export/home/kryten to the tape in tape drive 0.


$ cd /export/home/kryten
$ ls | cpio -oc > /dev/rmt/0
8 blocks
$ cpio -civt < /dev/rmt/0
drwxr-xr-x  2 kryten  users    0   Jun  9 15:56 1998, letters
drwxr-xr-x  2 kryten  users    0   Jun  9 15:56 1998, memos
drwxr-xr-x  2 kryten  users    0   Jun  9 15:55 1998, reports
8 blocks
$