[ Bottom of Page | Previous Page | Next Page | 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 use the cpio -o Command to read file path names from standard input and copy these files to standard output, along with path names and status information.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 the path names 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. To use a shorter command string, type:

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.2 Commands Reference for the complete syntax.

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