Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cpio(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

dd(1)

find(1)

ls(1)

tar(1)

cpio(4)




cpio(1) cpio(1)
NAME cpio - copies files to or from a cpio archive SYNOPSIS cpio -o [a] [c] [B] [F] [v] cpio -i [6] [b] [B] [c] [d] [f] [m] [r] [s] [S] [t] [u] [v] [patterns] cpio -p [a] [d] [l] [m] [u] [v] directory ARGUMENTS -6 Processes an old (that is, UNIX System Sixth Edition format) file. Useful only with -i option. -a Resets access times of input files after they have been copied. -b Swaps both bytes and halfwords. Used only with the -i option. -B Input/output is to be blocked 5,120 bytes to the record (does not apply to the -p option; meaningful only with data directed to or from 3.5-inch disks). -c Writes header information in ASCII character form for portability. -d Creates directories as needed. directory Specifies the directory to be copied. -f Copies in all files except those in patterns. -F Causes each floppy to be formatted after it is inserted into the drive, when used with the -o and when the output device is a Macintosh II floppy drive, the -F option. This formatting is for 800K drives only, so only 800K floppy disk should be used. -i Specifies copy-in; extracts files from the standard input, which is assumed to be the product of a previous cpio -o. Only files with names that match patterns are selected. patterns are given in the name-generating notation of sh(1). In patterns, the meta-characters ?, *, and [...] match the slash / character. Multiple patterns may be specified but if none are, the default for patterns is * (that is, select all files). The extracted files are conditionally created and copied into the current directory tree based on the flag options described later. The permissions of the files January 1992 1



cpio(1) cpio(1)
will be those of the previous cpio -o. The owner and group assigned to the files will be that of the current user unless the user is the superuser, which causes cpio to retain the owner and group assigned to the files from the previous cpio -o. When cpio -i prints a message xxx blocks, it indicates how many blocks were read from the collection. -l Links files (whenever possible) rather than copying them. Usable only with the -p option. -m Retains previous file-modification time. This option is ineffective on directories that are being copied. -o Specifies copy out; reads the standard input to obtain a list of pathnames and copies those files onto the standard output together with pathname and status information. The list of pathnames must contain only one file per line. (Thus, only certain commands, such as find or ls without the -C option, will work in a pipeline to cpio.) Output is padded to a 512-byte boundary. When cpio -o prints a message xxx blocks, it indicates how many blocks were written. -p Specifies pass; reads the standard input to obtain a list of pathnames of files that are conditionally created and copied into the destination directory tree based on the flag options described later. When cpio -p prints a message xxx blocks, it indicates how many blocks were written. patterns Specifies a list of files that have special treatment. -r Renames (interactively) files. If the user types a null line, the file is skipped. -s Swaps bytes. Used only with the -i option. -S Swaps halfwords. Used only with the -i option. -t Prints a table of contents of the input. No files are created. -u Copies unconditionally (normally, an older file will not replace a newer file with the same name). -v Specifies verbose mode; causes a list of filenames to be printed. When used with the -t option, the table of contents looks like the output of an ls -l command (see ls(1)). 2 January 1992



cpio(1) cpio(1)
DESCRIPTION cpio copies file and directories to or from a cpio archive. The cpio command does not follow symbolic links. EXAMPLES The pipeline: ls | cpio -o > /dev/rdsk/c8d0s0 copies the contents of a directory into an archive. The command: cd olddir find . -depth -print | cpio -pdl newdir duplicates a directory hierarchy. The simple case: find . -depth -print | cpio -oB > /dev/rdsk/c8d0s0 may be handled more efficiently by: find . -cpio /dev/rdsk/c8d0s0 LIMITATIONS Pathnames are restricted to 128 characters. If there are too many uniquely linked files, the program runs out of the memory needed to keep track of them and, thereafter, linking information is lost. Only the superuser may copy special files. FILES /bin/cpio Executable file SEE ALSO ar(1), dd(1), find(1), ls(1), tar(1) cpio(4) in A/UX Programmer's Reference January 1992 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026