[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 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 may 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, enter:

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

The -v flag displays the names of each file.

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

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

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

find . -cpio /dev/rfd0 -print

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

See the cpio command in the AIX Version 4.3 Commands Reference for the exact syntax.


[ Previous | Next | Contents | Glossary | Home | Search ]