System Administration Guide: Basic Administration

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

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


$ cd /export/home/kryten
$ ls | cpio -oc > /dev/rmt/0
16 blocks
$ cpio -civt < /dev/rmt/0
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filea
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, fileb
-r--r--r--    1 kryten   staff         76 Oct  7 08:17 2003, filec
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:17 2003, letters
drwxr-xr-x    2 kryten   staff          0 Oct  7 08:18 2003, reports
16 blocks
$