[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

System User's Guide: Operating System and Devices


Copying Files to Tape or Disk (cpio -o Command)

You can read file path names from standard input and copy these files to standard output, along with path names and status information with the cpio -o command. Path names cannot exceed 128 characters. Avoid giving the cpio command path names made up of many uniquely linked files, as it might not have enough memory to keep track of them and would lose linking information.

For example, to copy files in the current directory whose names end with .c onto diskette, type:

ls *.c | cpio -ov >/dev/rfd0

Press Enter.

The -v flag displays the names of each file.

For example, to copy the current directory and all subdirectories onto diskette, type:

find . -print | cpio -ov >/dev/rfd0

Press Enter.

This saves the directory tree that starts with the current directory (.) and includes all of its subdirectories and files. Do this faster by typing:

find . -cpio /dev/rfd0 -print

Press Enter.

The -print entry displays the name of each file as it is copied.

See the cpio command in the AIX 5L Version 5.1 Commands Reference for the exact syntax.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]